Skip to content

zod schema generator does not use same types as typescript #243

New issue

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

Closed
sschneider-ihre-pvs opened this issue Nov 16, 2022 · 1 comment
Closed
Labels
good first issue Good for newcomers

Comments

@sschneider-ihre-pvs
Copy link
Contributor

It seems that the mapping types of the typescript generator do not match the ones the zod generator is creating, I also have to say, the resulting type is exactly the same

type '{  description?: string | null | undefined; }' is not assignable to type '{ description?: InputMaybe<string> | undefined; }'.
@github-actions github-actions bot added the good first issue Good for newcomers label Nov 16, 2022
@sschneider-ihre-pvs
Copy link
Contributor Author

it seems that the Properties generic used in the return type should be also used as the z.object generic in the return to match the types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants