Hacker News new | ask | show | jobs
Should TypeScript support runtime types instead of relying on Zod? (twitter.com)
3 points by emykhailenko 70 days ago
1 comments

I recently noticed how much code is spent simply producing an enormous amount of Zod schemas and unit tests around them. Yeah, I know someone will say that people don't read code anymore anyway. But I do. I still like code, and I still have doubts about the quality of coding agents, but that's another topic ;)

Long story short, I experimented with the TypeScript compiler and built a small playground showing how I imagine runtime types could work in TypeScript.

https://nola.sh/playground/?example=types