Type alias Transpose<A, Transposed, Depth>
Transpose<A, Transposed extends unknown[][], Depth extends number>: A extends [infer T, ...(infer Rest)] ? T extends [infer L, infer R] ? Transposed extends [infer PL, infer PR] ? PL extends unknown[] ? PR extends unknown[] ? Transpose<Rest, [[...PL, L], [...PR, R]], Prev[Depth]> : never : never : Transpose<Rest, [[L], [R]], Prev[Depth]> : Transposed : Transposed Type Parameters
- A
- Transposed extends unknown[][] = []
- Depth extends number = 10