27. implement Flat<T>

TypeScript
Is this helpful ?

from all members: - accepted / - tried

Implement Flat<T> to flatten a tuple type.

type A = Flat<[1,2,3]> // [1,2,3]
type B = Flat<[1,[2,3], [4,[5,[6]]]]> // [1,2,3,4,5,6]
type C = Flat<[]> // []

Let's try to solve this problem within 10 mintues.

Discuss(4)