# Never

## `Never<Not, Type>`

A generic type `Never` indicates the generic type variable [`Type`](#type) is never of the generic type variable [`Not`](#not). It takes generic type variable [`Type`](#type) constrained by a generic type variable [`Not`](#not) which constraint causes its change to [`never`](https://www.typescriptlang.org/docs/handbook/basic-types.html#never).

{% code title="never.type.ts" %}

```typescript
type Never<Not, Type> = Type extends Not ? never : Type;
```

{% endcode %}

### Generic type variables

#### `Not`

A generic type variable `Not` constrain the generic type variable [`Type`](#type) causing the [`Type`](#type) change to [`never`](https://www.typescriptlang.org/docs/handbook/basic-types.html#never).

#### `Type`

A generic type variable `Type` constrained by generic type variable [`Not`](#not) is never [`Not`](#not).
