I am trying to add some extension methods for a 2 dimensional array using typescript.
For a 1 dimensional Array the syntax is easy: e.g.
interface Array<T> {
randomize();
}
Array.prototype.randomize = function () {
this.sort(() => (Math.round(Math.random()) - 0.5));
}
I was hoping I could do something similar with a 2 dimensional array, but the following does not work:
interface Array<Array<T>> {
test();
}
Is it possible in Typescript to prototye on a 2 dimensional array?