Is it possible to get code-hinting in JetBrains WebStorm for a non-core node package?

家住魔仙堡 提交于 2021-01-29 08:30:34

问题


Is it possible to get code-hinting in JetBrains WebStorm for a non-core node package? Specifically, I'd like to get hinting/completion working for buster. I can't seem to find any information on this. Thanks much!


回答1:


For buster.js, download buster-test.js and save it somewhere the WebStorm/PyCharm project can see it. Hinting should show up immediately.




回答2:


WebStorm 2020.1

There's a trick to getting "coding assistance" for 3rd party packages that support community stubs (AKA Typescript definition files):

  1. Open the project's package.json
  2. Position the cursor on the package (within the dependencies section)
  3. Press alt+enter (or click the light bulb)
  4. Choose Install '@types/name' (where name is the dependency)

For example:



来源:https://stackoverflow.com/questions/17507203/is-it-possible-to-get-code-hinting-in-jetbrains-webstorm-for-a-non-core-node-pac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!