What is the preferred method for boolean comparisons in Typescript types?
I have devised the following types for this purpose, but I am curious if there is a more standard or efficient approach:
type And<T1 extends boolean, T2 extends boolean> = T1 extends T2 ? T1 extends true ? true : false : false
type Or<T1 extends boolean, T2 extends boolean> = T1 extends true ? T1 : T2
type Xor<T1 extends boolean, T2 extends boolean> = T1 extends T2 ? T2 extends T1 ? false : true : true