You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zodToJzod: Zod discriminated unions are converted to unions in Jzod, which are converted back as plain unions in Zod, not discriminated unions as the original Zod Schema.
It shall be removed, as Zod discriminated unions are correctly converted to Jzod discriminated unions. The problem lies in the conversion of Jzod discriminated unions to Zod "plain" (not discriminated) unions. Jzod discriminated unions are not converted into Zod discriminated unions because Zod discriminated unions can not be harmoniously nested, there is an irregularity in the "result" (is it the created TS type from zod-to-ts or the parse() behavior?). TODO: CREATE AN ISSUE ON ZOD / ZOD-TO-TS DESCRIBING THE PROBLEM).
A warning shall be added during the conversion of Jzod discriminated unions with multiple discriminators (discriminatorType="array") to Zod, since Zod does not support discriminated unions with multiple discriminators.
The text was updated successfully, but these errors were encountered:
There's a warning:
It shall be removed, as Zod discriminated unions are correctly converted to Jzod discriminated unions. The problem lies in the conversion of Jzod discriminated unions to Zod "plain" (not discriminated) unions. Jzod discriminated unions are not converted into Zod discriminated unions because Zod discriminated unions can not be harmoniously nested, there is an irregularity in the "result" (is it the created TS type from zod-to-ts or the parse() behavior?). TODO: CREATE AN ISSUE ON ZOD / ZOD-TO-TS DESCRIBING THE PROBLEM).
A warning shall be added during the conversion of Jzod discriminated unions with multiple discriminators (discriminatorType="array") to Zod, since Zod does not support discriminated unions with multiple discriminators.
The text was updated successfully, but these errors were encountered: