marilari88 / zod-playground

Play with Zod schema validation
https://zod-playground.vercel.app
MIT License
31 stars 1 forks source link

Add new panel for the inferred typescript type #14

Open marilari88 opened 4 months ago

marilari88 commented 4 months ago

Utilize the zod-to-ts library (https://github.com/sachinraja/zod-to-ts) to automatically generate TypeScript types from our Zod schema. This would allow us to maintain accurate and up-to-date type definitions in a dedicated section (below the schema?)

giacomocerquone commented 4 months ago

Sorry what's the difference with z.infer? https://zod.dev/?id=type-inference

marilari88 commented 4 months ago

z.infer give us the type definition from schema but how to print them in the UI?

giacomocerquone commented 3 months ago

z.infer give us the type definition from schema but how to print them in the UI?

🤔 didn't think about this.