Exhaustive switch return type does not work when wrapped in a try-catch. #32905
Labels
Experience Enhancement
Noncontroversial enhancements
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
Milestone
TypeScript Version: 3.4.5
Search Terms:
Exhaustive switch return type does not work when wrapped in a try-catch
Code
playground
Expected behavior:
It should still work (because clearly in this case it can only return those values, or throw an error).
Actual behavior:
Error
The text was updated successfully, but these errors were encountered: