require-assert-never
Require a never witness in empty switch defaults so discriminated unions remain exhaustive at compile time.
Why
An empty default silently accepts new union members instead of making the compiler identify the missing case.
Fix
Use void (value satisfies never) or a helper accepting never, preserving the intended runtime fallback.
Examples
declare const kind: "a" | "b";switch (kind) { case "a": break; case "b": break; default:}function assertNever(value: never): never { throw new Error(`Unexpected kind: ${String(value)}`);}declare const kind: "a" | "b";switch (kind) { case "a": break; case "b": break; default: assertNever(kind);}