Type alias Xor<B1, B2>

Xor<B1, B2>: Or<And<B1, Not<B2>>, And<Not<B1>, B2>>

Exclusive OR (XOR) between two boolean types B1 and B2.

Type Parameters

  • B1 extends boolean
  • B2 extends boolean

Example

Xor<true, false>; // true
Xor<true, true>; // false