Give enum members stable string values.
Section: Tuples and Enums
Use a string enum
typescript
typescript
enum Status {
Draft = "draft",
Published = "published",
}Explanation
String enums are easier to debug than numeric enums in serialized output.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Tuples and Enums
Initialize tsconfig
Create a starter tsconfig.json in the current project.
Annotate basic variables
Explicitly type strings, numbers, and booleans.
Define an interface
Use an interface to model a reusable object shape.