> For the complete documentation index, see [llms.txt](https://type.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://type.angular-package.dev/type/never.md).

# 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).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://type.angular-package.dev/type/never.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
