diff --git a/typescript/types/layout.d.ts b/typescript/types/layout.d.ts index fc2e9f50d..2810026ca 100644 --- a/typescript/types/layout.d.ts +++ b/typescript/types/layout.d.ts @@ -1,5 +1,8 @@ type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +type UnionToIntersection = + (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never + type ExtractIds = [Depth] extends [never] ? never @@ -15,7 +18,7 @@ type ExtractIds = declare module Layout { type Layouter = - ExtractIds + UnionToIntersection> & { // these actually change T