![Why is Typescript unable to infer the correct type based off an enum switch statement? - Stack Overflow Why is Typescript unable to infer the correct type based off an enum switch statement? - Stack Overflow](https://i.stack.imgur.com/aZZuo.png)
Why is Typescript unable to infer the correct type based off an enum switch statement? - Stack Overflow
Switch statement starts generating "Not all code paths return a value" when wrapped in try/finally · Issue #19423 · microsoft/TypeScript · GitHub
![Type Safe and Exhaustive 'switch' statements, aka Pattern Matching in TypeScript | by Nayab Siddiqui | Technogise | Medium Type Safe and Exhaustive 'switch' statements, aka Pattern Matching in TypeScript | by Nayab Siddiqui | Technogise | Medium](https://miro.medium.com/v2/resize:fit:908/1*eOLurH4QgxkyGPyuYse_rQ.png)