Skip to content
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

Remove unnecessary duplicate type definitions (TS interfaces and Zod schemas) #800

Open
2 tasks
glevco opened this issue Nov 25, 2024 · 0 comments
Open
2 tasks

Comments

@glevco
Copy link
Contributor

glevco commented Nov 25, 2024

PR #728 introduced support for bigint output values, and it uses Zod schemas. Zod has a tool (infer) to generate TypeScript types based on schema definitions (but not the other way around).

For now, we have duplicate type definitions: our previously defined TS interfaces, and the equivalent Zod schema (example). We do verify that they match, but instead we could simply remove the TS interfaces and use Zod.infer to generate the types.

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

No branches or pull requests

1 participant