import type {CollapseLiterals, UnwrapBrand} from './internal/object.d.ts'; import type {IfNotAnyOrNever} from './internal/type.d.ts'; /** Returns a boolean for whether the given type is a `true` or `false` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types). @example ``` import type {IsBooleanLiteral} from 'type-fest'; type A = IsBooleanLiteral; //=> true type B = IsBooleanLiteral; //=> true type C = IsBooleanLiteral; //=> false type D = IsBooleanLiteral; //=> false ``` @category Type Guard @category Utilities */ export type IsBooleanLiteral = IfNotAnyOrNever>>; ifAny: false; ifNever: false; }>; type _IsBooleanLiteral = boolean extends T ? false : T extends boolean ? true : false; export {};