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
A comment such as
/* * @coerce true */ hello: number;
will turn the resulting z.number() into z.coerce.number()
z.number()
z.coerce.number()
hello: z.coerce.number()
The text was updated successfully, but these errors were encountered:
Feel free to create a PR!
Sorry, something went wrong.
Just saw, this feature has been implemented in #125, just that the PR's author hasn't written any tests for it yet..
https://github.com/fabien0102/ts-to-zod/releases/tag/v3.13.0 allows to append to a schema, does this solve your issue?
Yup, does.
No branches or pull requests
Feature description
A comment such as
will turn the resulting
z.number()
intoz.coerce.number()
Input
Output
The text was updated successfully, but these errors were encountered: