We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I used ts-to-zod. Errors occurred when used for types containing "-1" and "0" literals
export interface bugType { flag_a: -1 | 0; }
export const bugTypeSchema = z.object({ flag_a: z.union([z.literal(-1), z.literal(0)]) });
export const bugTypeSchema = z.object({ flag_a: z.union([z.-1(), z.literal(0)]) }); // error
Versions
v4.8.3
v3.19.1
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug description
I used ts-to-zod.
Errors occurred when used for types containing "-1" and "0" literals
Input
Expected output
Actual output
Versions
v4.8.3
v3.19.1
The text was updated successfully, but these errors were encountered: