Seeking: Example of how to use jsDoc with the Webstorm IDE (v 4)

倾然丶 夕夏残阳落幕 提交于 2019-12-06 11:16:46

问题


I'm still learning js and trying out the Webstorm IDE, which seems sweet (including jumping to var/function declarations).

I can see how to get the template for a jsdoc comment to appear but I'm not experienced with it and looking for an example of how to provide more detail in the comment and how to view that detail.


回答1:


WebStorm 4.0 supports most of JSDoc tags. For example, when you specify @type for variable, completion will work better and assignments of expressions with wrong types will be highlighted as warnings. Element documentation popup appears when Ctrl+Q is pressed on some reference. More specific info about supported tags can be found in JetBrains issue tracker, for example issue WI-1295.

Also, better support for google closure compiler tags is expected in 5th version.




回答2:


This tutorial might help :

http://blue-walrus.com/2014/04/using-jsdoc/

Its an introduction in how you can enhance your code with jsdoc in webstorm/phpstorm. Goes into @Type, @param, @return plus others.




回答3:


I feel your pain... I have recently started evaluating WebStorm also, and found the amount of documentation regarding how to integrate JSDoc into your code a bit lacking.

The following page provides a lot of detail about what tags are available, as well as a detailed description of each tag.

http://code.google.com/p/jsdoc-toolkit/wiki/TagReference

Hope that helps!



来源:https://stackoverflow.com/questions/11076572/seeking-example-of-how-to-use-jsdoc-with-the-webstorm-ide-v-4

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