TypeScript Programming Language
Basic Enum Declaration
Auto-incrementing Values
Custom Numeric Values
Reverse Mapping
String Value Assignment
Benefits over Numeric Enums
No Reverse Mapping
Mixed Value Types
Use Cases and Limitations
Constant Enum Expressions
Computed Enum Members
Initialization Rules
Compile-time Inlining
Performance Benefits
Limitations
String Literals
Numeric Literals
Boolean Literals
Template Literal Types
Previous
4. Arrays and Collections
Go to top
Next
6. Functions and Callable Types