Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Discriminated unions are also a wonderful part of the zod library. I use them to overload endpoints for multiple relevant operations.


+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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: