Hacker News new | ask | show | jobs
by eyelidlessness 1262 days ago
Your suggestion of zod is a very good one. I’ll take it further and suggest that if one wants to really embrace and learn TypeScript (or type systems like it), implementing your own zod-like library is an excellent learning experience. Building a set of composable “parse, don’t validate” primitives will help you think in the way the type system is designed to be most effective. And you’ll generally write better code for it.