Create strongly typed array of arrays in TypeScript
You do it exactly like in Java/C#, e.g. (in a class):
class SomeClass {
public someVariable: Array<Array<AnyTypeYouWant>>;
}
Or as a standalone variable:
var someOtherVariable: Array<Array<AnyTypeYouWant>>;
int
is not a type in TypeScript. You probably want to use number
:
var listOfLists : number[][];