# assertNever

> Overview of the assertNever function

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function assertNever(_x, msg): never;
```

Defined in: [packages/common/src/utils/assertNever.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/common/src/utils/assertNever.ts#L10)

Asserts that a value is never.

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `_x`
      </td>

      <td>
        `never`
      </td>

      <td>
        The value to assert.
      </td>
    </tr>

    <tr>
      <td>
        `msg`
      </td>

      <td>
        `string`
      </td>

      <td>
        The message to throw if the value is not never.
      </td>
    </tr>

  </tbody>
</table>

## Returns

`never`

Always throws an error.