-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
zod parsing bug #3608
Comments
Hi! Not totally sure what is causing the problem with the union type, but I think a discriminated union might work instead, e.g.:
|
I installed zod-to-ts to diagnose the problem. Actually, having used We resolved using I kindly suggest to add a tip in the documentation about this behaviour. |
This is my complex object zod definition
When I use this definition, in my code, zod parses it wrongly
In the console I found this:
What am I doing wrong ?
The text was updated successfully, but these errors were encountered: