Skip to content

Commit

Permalink
build fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Oct 11, 2023
1 parent 489f3d2 commit cb42bc0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/utilityTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ export namespace UtilityTypes {
/** Get the XOR type which could make 2 types exclude each other */
export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;

export type XOR3<T, U, V> =
(T | U | V) extends (infer R)
? (R extends T ? (U | V) : R) extends R
? (R extends U ? (T | V) : R) extends R
? (R extends V ? (T | U) : never)
: never
: never
: never;
/** Get the XOR type for 3 types */
export type XOR3<T, U, V> = XOR<XOR<T, U>, V>;
}

0 comments on commit cb42bc0

Please sign in to comment.