html52.com
我爱小程序-开发者交流社区

在Typescript环境下使用的Promise

https://developers.weixin.qq.com/miniprogram/dev/extended/utils/api-promise.html

有没有在Typescript环境下使用的Promise?按教程npm install后再import时报错

{

"resource": "/C:/Users/whh/WeChatProjects/miniprogram-11/miniprogram/app.ts",

"owner": "typescript",

"code": "7016",

"severity": 8,

"message": "无法找到模块“miniprogram-api-promise”的声明文件。“c:/Users/whh/WeChatProjects/miniprogram-11/node_modules/miniprogram-api-promise/src/index.js”隐式拥有 \"any\" 类型。\n  Try `npm install @types/miniprogram-api-promise` if it exists or add a new declaration (.d.ts) file containing `declare module 'miniprogram-api-promise';`",

"source": "ts",

"startLineNumber": 2,

"startColumn": 41,

"endLineNumber": 2,

"endColumn": 66

}

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付