shouldNeverHappen: A Simple Trick for Catching the Impossible in TypeScript
In every codebase, there are situations that should just never happen. Maybe it's a value that should have been validated earlier, or a branch in your logic that you’re 100% sure will never be executed. And yet… bugs happen.
Instead of scattering throw new Error(...) statements throughout