Nullish type
A T that may be null or undefined.
ts
import type { Nullish } from 'utils';Signature
ts
export type Nullish<T> = T | null | undefined;Parameters
| Name | Description |
|---|---|
T | The underlying type. |
Tests
Line coverage: 0 %.
Source
src/types/nullish.ts (on GitHub)
Source code
ts
/**
* A `T` that may be `null` or `undefined`.
*
* @template T - The underlying type.
*/
export type Nullish<T> = T | null | undefined;Keywords: nullish, types, type