Allow enums in local scopes #3217
Labels
Committed
The team has roadmapped this issue
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
Milestone
Currently the following is allowed:
This compiles, but gives a warning:
Especially when refactoring existing JavaScript code, there are cases where an enum would be useful, but wouldn't be used outside of a single function. In those cases, I think it makes sense to allow the enum to be defined inside of the function's scope.
The text was updated successfully, but these errors were encountered: