Use in the default case of a switch that you want to be fully exhaustive. Using this function forces the compiler to enforce exhaustivity during compile-time.
const number = 1;switch (number) { case 0: ... case 1: ... default: assertExhaustive(snapPrefix);}
The object on which the switch is being operated.
Use in the default case of a switch that you want to be fully exhaustive. Using this function forces the compiler to enforce exhaustivity during compile-time.
Example