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

enums are a feature of most programming languages. It doesn't matter to me why TypeScript had to add them, just like it doesn't matter why JS has functions or if statements.

90% of the enums I use are regular integer enums. I don't get much use out of string enums, as you say union types do that job just fine.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: