class A{ constructor(){ await this.sayHi(); } async sayHi(){ await ... } }
constructor里有await,async写在哪里
this.sayHi().then()吧 构造函数async不返回promise了吗?
548k questions
547k answers
4 comments
86.3k users