如何从异步方法调用时引用类实例。
class Senders {
callSendAPI() {
//Some code here
}
sendText() {
this.callSendAPI();
}
async sendCards() {
var dbpromise = await db.call();
console.log('this= ', this);
this.callSendAPI();
}
}
export {Senders};
this = undefined