An if-else-like type that resolves depending on whether the given type is unknown.
unknown
IsUnknown
import type {IfUnknown} from 'type-fest';type ShouldBeTrue = IfUnknown<unknown>;//=> truetype ShouldBeBar = IfUnknown<'not unknown', 'foo', 'bar'>;//=> 'bar' Copy
import type {IfUnknown} from 'type-fest';type ShouldBeTrue = IfUnknown<unknown>;//=> truetype ShouldBeBar = IfUnknown<'not unknown', 'foo', 'bar'>;//=> 'bar'
An if-else-like type that resolves depending on whether the given type is
unknown.