Hacker News new | ask | show | jobs
by eagsalazar2 1372 days ago
This x1000! Type guards are a joke and real runtime type checking could be so easy if they prioritized it. Yes you can use zod but then you have to define your types through zod which isn't as neat.

I actually googled for this just yesterday!

1 comments

I’m working on a code generator that converts Typescript types to other schema descriptions. One of the conversions is TS -> TypeBox/JSONSchema: https://github.com/justjake/ts-simple-type/blob/main/src/com...