6 ms·
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 you
by eagsalazar2 4y 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!
- jitl 4y agoI’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/compile-to/json-schema.ts https://github.com/justjake/ts-simple-type/blob/main/src/com...