assertNever / assert_never
Ends a switch over a union, so a variant nobody handles is a type error.
Python uses typing.assert_never, which threads does not re-export.
Import from @threads/core (TypeScript) or threads (Python).
function assertNever(value: never): neverParameters
valueneverrequiredThe value no case matched; the type checker proves none can.
Returns
never