Skip to content
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

Allows custom types to be passed to avoid cast to ObjectSchema #1358

Merged
merged 2 commits into from
May 7, 2021

Conversation

cipacda
Copy link
Contributor

@cipacda cipacda commented May 7, 2021

Similar to #1305, this allows the user to implement their own types for classes and not have fields forced to be of type ObjectSchema. This is very helpful when wanting to extend yup for js-joda LocalTime for example.

This is backwards compatible as the new generic type CustomTypes is not mandatory and is defaulted to never.

Copy link
Owner

@jquense jquense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o this is clever nice

@jquense jquense merged commit 94cfd11 into jquense:master May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants