-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
Fix typing for optional #765
Fix typing for optional #765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
checkFalsy: false, | ||
nullable: false, | ||
}); | ||
|
||
expect(chainToContext(schema[1]).optional).toEqual({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have pushed to your fork this change to the test, so it's a bit more useful!
Hello! This is out with v6.2.0! 🚢 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
There's a bug in the typings when marking a field as optional.
For example, this flags as an error
but allows the following:
However, this has no effect.
This has been addressed previously in #693 but it looks like this has been regressed.
Also see #742