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或更高版本

 解决方案 一 : 把 "target" : "es2015"

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

 方案二 :  在 'lib' 中添加 "es2015.promise"

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

 

相关文章:

  • 2022-02-04
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2021-09-12
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案