This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Union of all JavaScript primitive types (excluding `symbol` and `function`) */ | |
type Primitive = string | number | bigint | boolean | null | undefined; | |
/** Wraps a type in `null` */ | |
type Nullable<T> = T | null; | |
/** Deeply nullable (all nested props can be null) */ | |
type NullableDeep<T> = { | |
[K in keyof T]: T[K] extends object ? NullableDeep<T[K]> | null : T[K] | null; | |
}; |