Comment by DylanSp

2 years ago

Typescript's exhaustiveness checking can be kind of clunky sometimes, particularly if you have a switch statement that's just causing side effects and not returning a value. Last time I looked at it, I think you had to add a default case with some sort of dummy statement assigning a value to a variable with type `never`; while that's doable, the ergonomics are a bit annoying.

I recall having to add that dummy 'never' branch in the past, but I haven't had to do that in newer projects on recent versions of Typescript.