WebStorm 使用過程中出現的一些問題以及解決方案


標簽: WebStorm 配置
描述: 有關 WebStorm 使用過程中出現的一些問題以及其解決方案的匯總

“unresolved function or method”

問題描述:

使用某些庫如 Express.js 時 WebStorm 無法識別某些函數

問題原因:

這些函數是在運行時動態添加的,WebStorm 不能通過靜態分析解析這些函數

解決方法:

為 WebStorm 安裝此庫的 TypeScript 定義即可,方法是單擊庫的名字,按 Alt+Enter,然和選擇安裝 TypeScript 定義即可,如下圖:
image.png

WebStorm 不能識別 jQuery 的 $ 符號

  1. First press CTRL + ALT + S and go to settings.
  2. Then click from the menu Languages & Frameworks
  3. Select JavaScript from the section below and select Libraries
  4. In the open menu on the right, click on the Download button and select jquery from the list.
  5. Download it and apply. It is done.
    解決方法來自於: https://stackoverflow.com/questions/37038850/why-intellij-idea-doesnt-recognize-the-dollar-operator-of-jquery


免責聲明!

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



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