Enums currently get outputted to an object with two-way mapping of numbers. This makes it hard to iterate through the names (or values) of an enum. A method on the enum object to get the keys of the enum would allow iterating.
See this StackOverflow question for a use case of iterating. (And use of a regular expression for filtering).
Possible Solutions:
Add a length property (for enums with default index) too limited
- Function on enum type filtering keys looking for numbers (could break with other index types)
- Add a function with the keys hard coded when compiling
Complications:
Enums currently get outputted to an object with two-way mapping of numbers. This makes it hard to iterate through the names (or values) of an enum. A method on the enum object to get the keys of the enum would allow iterating.
See this StackOverflow question for a use case of iterating. (And use of a regular expression for filtering).
Possible Solutions:
Add a length property (for enums with default index)too limitedComplications: