-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug] Wrong types for defaultValue #2236
Comments
The TypeScript types are deliberately stricter than the JavaScript implementation to help guide users to safer patterns by default. In this case if this was silently allowed, you would have your option value being a See similar closed PR #1792 |
The Pull Request that removed multiple uses of |
In many cases, you can get the type you want and strict types by also specifying a custom option processing function. If that isn't a match for what you want you can also use the
|
Example:
Result:
The text was updated successfully, but these errors were encountered: