@@ -10,10 +10,8 @@ export type StaticType<T extends abstract new (...args: any) => any> = Omit<T, "
|
|||||||
|
|
||||||
export type Merge<Super, Self> = Omit<Super, CommonKeys<Self, Super>> & Self
|
export type Merge<Super, Self> = Omit<Super, CommonKeys<Self, Super>> & Self
|
||||||
|
|
||||||
export type Includes<T extends readonly any[], U> = (
|
export type Includes<T extends readonly any[], U> = T extends [infer Head, ...infer Tail]
|
||||||
T extends [infer Head, ...infer Tail]
|
|
||||||
? (<X>() => X extends Head ? 1 : 2) extends (<X>() => X extends U ? 1 : 2)
|
? (<X>() => X extends Head ? 1 : 2) extends (<X>() => X extends U ? 1 : 2)
|
||||||
? true
|
? true
|
||||||
: Includes<Tail, U>
|
: Includes<Tail, U>
|
||||||
: false
|
: false
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user