ts問題處理(2): '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或更高版本

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

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM