import type {Not} from './internal/type.d.ts'; import type {And} from './and.d.ts'; import type {Or} from './or.d.ts'; /** Returns a boolean for whether only one of two given types is true. Use-case: Constructing complex conditional types where one single condition must be satisfied. @example ``` import type {Xor} from 'type-fest'; type TT = Xor; //=> false type TF = Xor; //=> true type FT = Xor; //=> true type FF = Xor; //=> false ``` Note: When `boolean` is passed as an argument, it is distributed into separate cases, and the final result is a union of those cases. For example, `Xor` expands to `Xor | Xor`, which simplifies to `true | false` (i.e., `boolean`). @example ``` import type {Xor} from 'type-fest'; type A = Xor; //=> boolean type B = Xor; //=> boolean type C = Xor; //=> boolean type D = Xor; //=> boolean type E = Xor; //=> boolean ``` Note: If `never` is passed as an argument, it is treated as `false` and the result is computed accordingly. @example ``` import type {Xor} from 'type-fest'; type A = Xor; //=> true type B = Xor; //=> true type C = Xor; //=> false type D = Xor; //=> false type E = Xor; //=> boolean type F = Xor; //=> boolean type G = Xor; //=> false ``` @see {@link And} @see {@link Or} */ export type Xor = And, Not>>; export {};