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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.