I need to convert the following code into TypeScript. it is to create a key\value pairs
this.charUrls = item.urls.reduce(function (map, obj) {
map[obj.type] = obj.url;
return map;
}, {});
I tried the following but it didn't work
this.charUrls = item.urls.reduce(function (map, obj) { map[obj.type] = obj.url; return map; });