Returns a boolean for whether the given type is null.
null
import type {IsNull} from 'type-fest';type NonNullFallback<T, Fallback> = IsNull<T> extends true ? Fallback : T;type Example1 = NonNullFallback<null, string>;//=> stringtype Example2 = NonNullFallback<number, string>;//=? number Copy
import type {IsNull} from 'type-fest';type NonNullFallback<T, Fallback> = IsNull<T> extends true ? Fallback : T;type Example1 = NonNullFallback<null, string>;//=> stringtype Example2 = NonNullFallback<number, string>;//=? number
Returns a boolean for whether the given type is
null.