Sha256: 4f5bbef956920cfd90f2cbffccb3c34f8dfc64faaba368d9d41a46925511b6b0
Contents?: true
Size: 483 Bytes
Versions: 28
Compression:
Stored size: 483 Bytes
Contents
import type {IsNull} from './is-null'; /** An if-else-like type that resolves depending on whether the given type is `null`. @see {@link IsNull} @example ``` import type {IfNull} from 'type-fest'; type ShouldBeTrue = IfNull<null>; //=> true type ShouldBeBar = IfNull<'not null', 'foo', 'bar'>; //=> 'bar' ``` @category Type Guard @category Utilities */ export type IfNull<T, TypeIfNull = true, TypeIfNotNull = false> = ( IsNull<T> extends true ? TypeIfNull : TypeIfNotNull );
Version data entries
28 entries across 28 versions & 2 rubygems