colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
33.92k stars 1.18k forks source link

Question: TypeScript Isolated Declarations #3751

Open aminpaks opened 1 month ago

aminpaks commented 1 month ago

Hi folks,

Firstly, thanks for all the work you've done building such a great project. We're wondering what you have plan for making a lighter type annotations for projects using isolated declarations. We tried Zod with the current version, and explicitly type annotating the module exports are not easy to maintain.

What are you thoughts?

JavaScriptBach commented 1 month ago

I'm also interested in this, although I don't see a good way of reconciling Zod with isolated declarations since the whole point of Zod is that it will automatically keep the type in sync with the schema.