Hacker News new | ask | show | jobs
by blorenz 679 days ago
Discriminated unions are also a wonderful part of the zod library. I use them to overload endpoints for multiple relevant operations.
2 comments

+1 for the discriminated unions
I used to use io-ts heavily but zod is my go to now - and it’s so ergonomic and easy for typescript newbies to pick up and grasp.