async function foo() {
await this.getAsync();
await this.getAsyncTwo();
await this.getAsyncThree();
await this.getAsyncFour();
}
看看 foo 如何有多个等待调用,有没有办法在保持执行顺序的同时简化它?
我希望有可能写出类似的东西
async function foo() {
await
this.getAsync(),
this.getAsyncTwo(),
this.getAsyncThree(),
this.getAsyncFour();
}
或者
async function foo() {
await
this.getAsync()
.this.getAsyncTwo()
.this.getAsyncThree()
.this.getAsyncFour();
}