News for hackers. Stuff that matters.
Re:TypeScript please give us types by JulianChastain on Friday July 07, 2023 @07:06PM (#36639445)
I would recommend `zod` as a good typescript schema runtime validation library as well. It does require strict type checking to be on however.
Re:TypeScript please give us types by mixedCase on Friday July 07, 2023 @07:21PM (#36639565)
Alternatively, io-ts is more performant and has been around for a while longer. Although it does have a more functional interface.
Re:TypeScript please give us types by IggleSniggle on Friday July 07, 2023 @07:32PM (#36639669)
I like typia for doing codegen basically in the way this request is asking: it hooks into the typescript API to create runtypes from plain old typescript
Re:TypeScript please give us types by vendiddy on Friday July 07, 2023 @09:03PM (#36640272)
I use zod but it's a workaround. I use non standard syntax to define types.

If typescript emitted type information, we'd be able to automatically get runtime validation at the boundaries of our apps.