## assertNever() function

Checks that a value has type `never`. Useful for ensuring exhaustive matches.

**Signature:**

```typescript
export declare function assertNever(value: never): never;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| value | never | The value that should never be present |

**Returns:**

never

## Example

```typescript
  type MyUnion = 'a' | 'b' | 'c'

function f(arg: MyUnion) {

if (arg === 'a') { return 1; }

if (arg === 'b') { return 2; }

assertNever(arg); // Type error: 'c' is unhandled

}
```

- [assertNever() function](/content/docs/sdk/core.assertnever#assertnever-function/index.html)
- [Parameters](/content/docs/sdk/core.assertnever#parameters/index.html)
- [Example](/content/docs/sdk/core.assertnever#example/index.html)
