String enums from string constants #43902
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Fix Available
A PR has been opened for this issue
Suggestion
An idea for TypeScript
Suggestion
If possible, it would be nice to be able to define enum with string values, coping over string values from other enums (if their values can be calculated statically during compilation). Example:
🔍 Search Terms
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
✅ Viability Checklist
I DON'T know if my suggestion meets these guidelines:
⭐ Suggestion
📃 Motivating Example
As shown above, in the code example, this will help to avoid duplicating constant string literals everywhere (if you want to define them in multiple places, including inside an enum).
💻 Use Cases
As stated in the motivation, to group string literals that are defined as constants inside enums
The text was updated successfully, but these errors were encountered: