type-level-typescript-workshop
type-level-typescript-workshop copied to clipboard
ex. 02-7, nonoptimal hint and solution
type XOR<bool1, bool2> = TODO
https://github.com/gvergnaud/type-level-typescript-workshop/blob/a2234bea76dbbc4b97c074e1b1c40e08f6c7529e/02-assignability-and-conditional-types/exercises.ts#L140
https://github.com/gvergnaud/type-level-typescript-workshop/blob/a2234bea76dbbc4b97c074e1b1c40e08f6c7529e/02-assignability-and-conditional-types/solution.ts#L131
alternative solution
type XOR<bool1, bool2> = bool1 extends bool2? false: true;