Re:TypeScript please give us types
by rcme on Friday July 07, 2023 @03:58PM
(#36637505)
There are good typed deserialization libraries. Personally, I prefer runtypes but there are options.
[ Parent
| on HN ]
Agree, zod, arktype, and typia are impressively easy to use! Though, I feel that this environment created a different problem of spreading developers into multiple solutions. So for lib devs like me, we end up having to choose between coupling with a single validation lib or managing support for multiple (like tRPC does). To address that, I ended up doing a reusable lightweight lib that wraps that logic for supporting multiple: https://typeschema.com
Re:TypeScript please give us types
by code_biologist on Saturday July 08, 2023 @03:08AM
(#36642083)
Thanks for the lib! I'm always charmed to come across such a concrete example of the fundamental theorem of software engineering: "We can solve any problem by introducing an extra level of indirection."