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.的主要内容,如果未能解决你的问题,请参考以下文章