Initialize a Map containing arrays in TypeScript
Per Mozilla's Map documentation, you can initialize as follows:
private _gridOptions:Map<string, Array<string>> =
new Map([
["1", ["test"]],
["2", ["test2"]]
]);
variableName: Map<string, string[]> = new Map();
To push elements into Map:
variableName.set("a", ["b", "c"]);
To get/retrieve elements from map:
variableName.get(key);// "a" in above case
Or directly use
variableName: Map<string, string[]> = new Map("a", ["b", "c"]);