When an array of promises is built and then passed to the Promise.all
method, does execution start immediately or only once Promise.all
is called?
Consider the following code snippet:
let promises: Promise<string> [] = [this.methodCall(), this.methodCall(), this.methodCall()];
Promise.all(promises).then(values => {
...
}).catch(error => {
...
});
In addition, can this code example catch all rejections that may occur?