TypeScript - Enums

TypeScript has a specific type called Enum to handle data types consisting of a set of named values

TypeScript supports number, string, and mixed types of enums

Create own enum

I can create enumerated types for both string and number values

Replace enums with as consts

I know that usage of enums is by some considered as an antipattern. I know that I can use immutable object created with as const as an alternative solution to enums

I know pros and cons of both approaches to enumerated values

Icon of TypeScript
Icon of Enums
TypeScript skill
suggested
Enums
Ready to learn
Required technologies

I can create enumerated types for both string and number values

I know that usage of enums is by some considered as an antipattern. I know that I can use immutable object created with as const as an alternative solution to enums

I know pros and cons of both approaches to enumerated values

Close
Loading content