Nullish<T>
Nullish<
T> =T|null|undefined
Represents a value that can be null or undefined.
Type Parameters
T: T
The base type.
Since
1.0.0
Example
type Settings = {
theme: string;
language: `Nullish<string>`; // string | null | undefined
};
const settings: Settings = {
theme: "dark",
language: null // Valid
};