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?
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?
const categoryMap = new Map<string, string[]>();
or
const categoryMap: Map<string, string[]> = new Map();