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

猜你喜欢

转载自www.cnblogs.com/justsong/p/11761177.html