ts-to-zod
ts-to-zod copied to clipboard
z.coerce in ts-to-zod
Feature description
A comment such as
/*
* @coerce true
*/
hello: number;
will turn the resulting z.number()
into z.coerce.number()
Input
/*
* @coerce true
*/
hello: number;
Output
hello: z.coerce.number()
Feel free to create a PR!
Just saw, this feature has been implemented in #125, just that the PR's author hasn't written any tests for it yet..