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

I'm certainly confused now whether or not we are talking about the same thing. Without delving to much on the use of the word "union", how would you solve the use case presented in the typescript examples using enums?


Reading more about it, it could seem that we are talking about the same thing, except that it was so far over my head, that I didn't realise it.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: