-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Types - Type 'string' is not assignable to type xxx #494
Comments
Having same issues here. |
I'd raised another issue for this here: |
Has anyone figured out a temporary workaround? Package is super great otherwise! |
I'll have a look at this ASAP. |
Thank you so much! ❤️ We really appreciate your work on this |
The issue should be solved with the release 6.0.7 that I've just pushed. |
This is solved!!! Just checked with v6.0.7 |
Do you want to request a feature or report a bug?
bug with types
What is the current behavior?
toast.POSITION.xxx and toast.TYPE.xxx can't be passed to ToastContainer or toast() ->
Type 'string' is not assignable to type '"info" | "success" | "warning" | "error" | "default" | undefined'.
Type 'string' is not assignable to type '"top-right" | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left" | undefined'.
Type 'string' is not assignable to type '"top-right" | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left" | undefined'.ts(2322) index.d.ts(48, 5): The expected type comes from property 'position' which is declared here on type 'IntrinsicAttributes & ToastContainerProps & { children?: ReactNode; }'
the same issue (part of it) has already been fixed here - #470 - however it looks to me as not solved (in the latest 6.0.5 version) according to this simple codesandbox test - https://codesandbox.io/s/react-toastify-type-mismatch-33ulj?file=/src/index.tsx
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
https://codesandbox.io/s/react-toastify-type-mismatch-33ulj?file=/src/index.tsx
What is the expected behavior?
toast.POSITION.xxx and toast.TYPE.xxx values should be allowed for use in ToastContainer and toast()
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
react-toastify 6.0.5
The text was updated successfully, but these errors were encountered: