How Do Enums Work in TypeScript?
Demystifying and mastering enums in TypeScript
Published in
3 min readMar 22, 2022
Enums, also known as Enumerations, are constants defined that can be used anywhere in the code. They are relatively straightforward to understand.
How to define Enums?
Enums can be defined in Typescript using the enum
keyword. This is how we can define one: