> 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-draft/type/defined.md).

# Defined

## `Defined<Type>`

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

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

```typescript
type Defined<Type> = Type extends undefined ? never : Type;
```

{% endcode %}

{% embed url="<https://github.com/angular-package/type/blob/main/src/type/defined.type.ts>" %}

### Generic type variables

#### `Type`

A generic type variable `Type` is never [`undefined`](https://www.typescriptlang.org/docs/handbook/basic-types.html#null-and-undefined) but captured type.
