Is there a way to use JSDoc to annotate source code written in CoffeeScript when working in PhpStorm/WebStorm? When working in the IDE, it is very helpful to be able to use JSDoc to have proper code completion for functions.
I found this past question: How to document CoffeeScript source code with JSDoc? However, the answers and comments are not clear on whether it is supported or what the proper syntax is.
With PhpStorm, you can develop modern web, mobile, and desktop applications with JavaScript and Node. js. PhpStorm also supports React, Angular, Vue. js, and other frameworks and provides tight integration with various tools for web development.
You can use most JSDoc type syntax and any TypeScript syntax, from the most basic like string to the most advanced, like conditional types.
JSDoc is a markup language used to annotate JavaScript source code files. Using comments containing JSDoc, programmers can add documentation describing the application programming interface of the code they're creating.
By default, JSDoc uses the built-in "default" template to turn the documentation into HTML. You can edit this template to suit your own needs or create an entirely new template if that is what you prefer. This command will create a directory named out/ in the current working directory.
Here is an updated answer for anyone who comes across this thread in the future. WebStorm 2017.3 (the current version as of this writing) has support for CoffeeScript javadocs.
The basic syntax is this:
###*
* Here is a simple description for foo
* @param {Bar} bar - Some parameter to foo
* @returns {Object} The thing that foo returns
###
foo = (bar) ->
WebStorm will give you the documentation when you press ctrl+Q.
Unfortunately this is not currently supported. Pleasze feel free to file a request for this feature to youtrack
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With