News for hackers. Stuff that matters.
Re:Hegel – An advanced static type checker for JavaScript by hermanradtke on Thursday October 13, 2022 @07:29AM (#33189614)
Type guards are the primitives one needs to satisfy the compiler. No one wants to hand roll a JSON parser using those type guards. Yes, we have libraries like io-ts and zod. Having all those different libraries means my own library may export zod schema’s while your application uses runtypes.

I understand that adding something like zod is out of scope for tsc. However, type guards alone are not the full answer either.

There are no comments on this comment yet.