Hacker News new | ask | show | jobs
by kipple 1655 days 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-Desi... [2] https://github.com/colinhacks/zod

1 comments

Zod looks super cool. I'll have to check it out in depth.