▲ | ngrilly 4 days ago | ||||||||||||||||||||||
Then that means we have to define the interface twice: once in TypeScript and another in Zod? | |||||||||||||||||||||||
▲ | kentonv 4 days ago | parent [-] | ||||||||||||||||||||||
No. Zod gives you TypeScript types corresponding to the schema. So you would only need to write the schema in Zod. (I do wish it could be the other way, though: Write only TypeScript, get runtime checks automatically.) | |||||||||||||||||||||||
|