TypeScript 函数返回值为 Promise 的类型定义
在 TypeScript 中,可以使用 'Promise
export type UserActions = {
login({ commit }: ActionContext<UserState, RootState>, LoginParm: LoginParm): Promise<Result>
}
这里,'login()' 函数返回值为 Promise
原文地址: https://www.cveoy.top/t/topic/njDA 著作权归作者所有。请勿转载和采集!