Typescript create new map<String, List<String>>

Viewed 965

I'm trying to create a new Map in Typescript like this: Map<String, List < String > >. Something like (this example is in java):

private map<String, List<String>> map = HashMap<String, ArrayList<String>();

Until now my code is:

myMap=new Map();

I tried different approaches but it doesn't work. How it can be done?

1 Answers
const categoryMap = new Map<string, string[]>();

or

const categoryMap: Map<string, string[]> = new Map();
Related