I am trying to flatten a multidimensional array in TypeScript. The array that will be returned should have the numbers in ascending order.
Given [[3, 2, 1],