DEV Community

Discussion on: The Dangers of TypeScript Enums

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Incidentally, C++ enum work the exact same way (except they can only be assigned to int-based values). Too bad Typescript (apparently) doesn't have something analogous to the C++ enum class, which resists implicit casting.