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