How to create any array of different generics?

Viewed 85

I'd like to create and array of array where types have to be the same. Eg.

// Implements the type
[['foo', 'bar'], [null, null], [1, 2]]

// Doesn't implement the type
[[1, 'foo'], [true, undefined]]

How could this be done in TypeScript?

0 Answers
Related