Typescript Concat Tuples Type
Acid Coder

Acid Coder @tylim88

About: Who needs meth when you have Typescript?

Joined:
Oct 31, 2021

Typescript Concat Tuples Type

Publish Date: Dec 15 '22
0 0
type ConcatArrays<
   ACC extends any[][], 
   N extends 1[] = []
> = [...ACC[N['length']], ...([...N,1]['length'] extends ACC['length'] ? [] : ConcatArrays<ACC, [...N, 1]>)]
Enter fullscreen mode Exit fullscreen mode

Image description

max 50 tuples

playground

Comments 0 total

    Add comment