I have the following code
value1: string; value2: string; ... activate(): Promise<any> { return Promise.all([ this.promise1().then(value1 => this.value1 = value1), this.promise2().then(value2 => this.value2 = value2) ]); } Is there a convenience method for something like this?
I tried the following but did not work as I had hoped
return Promise.all([ this.value1 = this.promise1().value(), this.value2 = this.promise2().value() ]);