Extract the inferred type is not working as expected #2772
-
In documentation says that we can infer the type from a schema like this: But when I try this with the example above, I was expecting attributes required by default and optional only for those I set as optional...
however, I'm receiving all attributes as optionals, is that right? I'm using zod |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have the same issue. zod - |
Beta Was this translation helpful? Give feedback.
-
it works for me when i changed strict to true, take a look in docs about that requirements // tsconfig.json
{
// ...
"compilerOptions": {
// ...
"strictNullChecks": true
}
} |
Beta Was this translation helpful? Give feedback.
-
Thanks @dudubernardino, it worked for me |
Beta Was this translation helpful? Give feedback.
it works for me when i changed strict to true, take a look in docs about that requirements