Skip to content
Functionutilsv0.9.0

assertNever

Exhaustiveness guard for discriminated unions. Place in the default branch of a switch over a union's discriminant: if a new variant is added without a matching case, the call fails to compile.

Throws:

  • A SeedcordTypeError whenever it runs. Only a value the types ruled out can reach it.

assertNever(value: never): never