Open shaKY-iota opened 2 years ago
https://github.com/type-challenges/type-challenges/issues/593#issue-777632788
type Flatten<T extends unknown[]> = T extends [infer First, ...infer Rest] ? First extends unknown[] ? Flatten<[...First, ...Rest]> : [First, ...Flatten<Rest>] : T