I'm currently in the process of familiarizing myself with Async/Await in Typescript.
I've been updating existing code, for example:
getImportanceTypes(): Promise<void> {
return this.importanceTypeService.list()
.then(items => {
this.importanceTypes = items;
});
}
which is being converted to:
async getImportanceTypes(): Promise<void> {
this.importanceTypes = await this.importanceTypeService.list()
}
My question now is: Does this new implementation really return a promise? It seems to compile successfully, but it looks like the code execution pauses at the await until it finishes, and then continues.
I'm asking because I have around 10 similar calls to the one mentioned above (for different type tables) and I want them to run concurrently using Promise.all.