@mega-yfue/eufy-sdk / assertNever
Function: assertNever()
ts
function assertNever(value): never;Exhaustiveness guard for discriminated unions. Placed in a switch default (or the else of an if-chain) over every variant: if a new variant is added and left unhandled, the call fails to typecheck (its type is no longer never), and at runtime it throws instead of silently falling through.
Parameters
value
never
Returns
never