typescript 中调用 Bomb.User.login() 时报错,出错代码:
const login = createAsyncThunk(
'login/login',
async ({ userId, passwd }: { userId: string, passwd: string }) => {
let res = await Bomb.User.login(userId,passwd)
}
)
报错:
类型在其自身的 "then" 方法的 fulfillment 回调中被直接或间接引用。
看声明文件中写的 export interface BmobPromise<T = any> extends Promise<BmobPromise<T>> {} 是 Promise 的子类,按理来说应该能用 async/await
typescript 中调用
Bomb.User.login()时报错,出错代码:报错:
看声明文件中写的
export interface BmobPromise<T = any> extends Promise<BmobPromise<T>> {}是 Promise 的子类,按理来说应该能用 async/await