import { isAny } from '..'; /** * Evaluates if the specified type is `unknown`. * * @example * type A = isUnknown; * // ^? true * type B = isUnknown; * // ^? false * type C = isUnknown; * // ^? false */ export type isUnknown = isAny extends true ? false : unknown extends Type ? true : false; /** * A utility type that substitutes a default type when the provided type is unknown. * @example * type A = defaultOnUnknown; // Result: string * type B = defaultOnUnknown; // Result: number */ export type defaultOnUnknown = isUnknown extends true ? Default : Type;