3 ms·
This would be a big (but exciting) departure from the current TS goal of "Impose no runtime overhead on emitted programs." [1] Recently, I've been using Zod [2
by kipple 5y ago
This would be a big (but exciting) departure from the current TS goal of "Impose no runtime overhead on emitted programs." [1]
Recently, I've been using Zod [2] and find it to be a satisfying equivalent: you define a schema, and then you get both a TS type AND a JS parser/validator (which works as a TS typeguard).
[1] https://github.com/microsoft/TypeScript/wiki/TypeScript-Design-Goals https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi...
[2] https://github.com/colinhacks/zod https://github.com/colinhacks/zod
- moron4hire 5y agoZod looks super cool. I'll have to check it out in depth.