Multi await support
Dear, TypeScript team,
Could it be more efficient and convenient way to use multi await support. I wrote an example below:
let sums = await Promise.all(result.map(item=> this.get<number>(`/api/values/${item}`)));
may it be better to use more smart syntax here:
let sums = await result.map(item=> this.get<number>(`/api/values/${item}`));
so compiler here should use overloaded version of await: first with one promise parameter, and second with array of promises. So this is just my offer for simplify this. Thank you in advance!
Expected behavior:
let sums = await result.map(item=> this.get/api/values/${item}));
Actual behavior:
let sums = await result.map(item=> this.get/api/values/${item}));
Regards, Serik
Changing the emit of await based on the type of its awaited expression goes against certain principles of our language - mainly that we avoid type-informed emit.