Open xTVaser opened 3 years ago
Here's a PR with a version that supports enums as well: https://github.com/colinhacks/tozod/pull/27
Do we have an update on this? I am trying to use toZod with a type that has an enum prop. After toZod enum is never.
Enum values don't seem to be supported currently, a minimal example:
Produces the following:
I suspect this may be related to #4 as under the hood, ZodEnums are just ZodUnions.