Enum in Switch - Error:() TS2678: Type 'x' is not comparable to type 'y'. · Issue #29204 · 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)
Type Safe and Exhaustive 'switch' statements, aka Pattern Matching in TypeScript | by Nayab Siddiqui | Technogise | Medium
![typescript - Compilation error when using a variable initialized by an enum value inside a switch - Stack Overflow typescript - Compilation error when using a variable initialized by an enum value inside a switch - Stack Overflow](https://i.stack.imgur.com/dlukY.png)
typescript - Compilation error when using a variable initialized by an enum value inside a switch - Stack Overflow
![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)