An if-else-like type that resolves depending on whether the given type is unknown.
unknown
This type will be removed in the next major version. Use the If type instead.
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.