ts问题处理: 'Promise' only refers to a type, but is being used as a value here.

Posted andy-lehhaxm

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ts问题处理: 'Promise' only refers to a type, but is being used as a value here.相关的知识,希望对你有一定的参考价值。

error TS2585: ‘Promise‘ only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.

软件翻译后:  Promise仅指类型,但在这里用作值。是否需要更改目标库?尝试将“lib”编译器选项更改为es2015或更高版本

解决方案:

技术图片

 

以上是关于ts问题处理: 'Promise' only refers to a type, but is being used as a value here.的主要内容,如果未能解决你的问题,请参考以下文章

(node:11254)UnhandledPromiseRejectionWarning:未处理的promise promise(拒绝id:1):TypeError:无法读取null的属性'l

打字稿:错误 TS2693:“承诺”仅指一种类型,但在此处用作值

输入'promise.Promise '不能指定为'承诺' “

Ts重构Axiosurl处理篇

vue-i18n + Element-ui 国际化处理(TS)

TypeScript Jquery Promise 参数不匹配