Sha256: dd9694eecd70a405490ad23940ccd8979a628f1d26928090a4b05a943ac61714
Contents?: true
Size: 419 Bytes
Versions: 28
Compression:
Stored size: 419 Bytes
Contents
/** Returns a boolean for whether the given type is `null`. @example ``` import type {IsNull} from 'type-fest'; type NonNullFallback<T, Fallback> = IsNull<T> extends true ? Fallback : T; type Example1 = NonNullFallback<null, string>; //=> string type Example2 = NonNullFallback<number, string>; //=? number ``` @category Type Guard @category Utilities */ export type IsNull<T> = [T] extends [null] ? true : false;
Version data entries
28 entries across 28 versions & 2 rubygems