Here's a crazy idea. Take the following simple example (in javascript):
var m = [[1], [2], [3]];
// ... a lot of code in between, perhaps m was passed through
// several functions without TypeScript type declarations, so you might mistakenly
// think m is a simple array like [1, 2, 3] at this point...
var m2 = [];
m.forEach(x => {
m2.push(x); //# [[number], [number], ...] will be the form of m2 here