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

In typescript, some types are values. Typescript treats enums as types, but they're secretly values. Classes are types and values.


How does that affect things in real code bases? I'm with Aeolun on this. I work with Typescript enums all the time, and have never encountered any issues. Maybe the other options work slightly better. But I struggle to see how Typescript enums could cause any problems when used like I'd use enums in any other language.




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

Search: