# assertNever

`function` in `utils` · v0.9.0

<https://seedcord.org/docs/packages/utils/0.9.0/functions/assert-never>

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.

```ts
assertNever(value: never): never
```

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.

Parameters.

- `value` `never`

Returns `never`.
