-
Notifications
You must be signed in to change notification settings - Fork 933
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
Typescript types: nullable and defined return any #1253
Comments
This can be anything: a miss-type, conflicting declarations, a value that cannot be inferred. Can you give a use-case? |
Yes here is a simple example:
Both fooSchema.defined() and array().of(fooSchema) return any Happens which pretty much any object schema. |
Opened pull request #1256 to fix this for arrays |
@bart-opplane Thanks for the pull request. Do you have an idea how to fix it for objects? |
@mdismer It's me, @bart-opplane , but from my personal account. No idea. To be honest, the typings in this library are super confusing. |
Describe the bug
nullable() and defined() on object and array schema return any.
Expected behavior
Both functions return the correct type (ObjectSchema / ArraySchema)
Platform:
The text was updated successfully, but these errors were encountered: