JSDoc refer to type in another module
Hello. It seems like refering to a type from another module does not work using js doc. For instance:
| Module 1 |
|---|
|
/** @module module1 */ |
| Module 2 |
|---|
/** @module module2 */ |
Perhaps I am doing something wrong though?
Please sign in to leave a comment.
Webstorm doesn't currently support @exports and @module JSDoc tags
However I'm not sure why you need them here... These tags are mainly used for documenting JS modules; to get the Test1 methods resolved, you can just use
/**
* @type {Test1}
*/
var b;
b.myFunc();
This was a simplified example. My actual usage is with an AMD module (ie: define([], /** @exports somethig */ function() {...}), and I was wondering why Webstorm was giving me an error when referring to a type in another module, whereas the built documentation was giving me the proper type referencing. But that clears it up I think. Are there any plans to support these, or any youtrack issues I can upvote?
Thanks,
Mathieu.
There are no youtrack tickets related to @module and @exports support. Please feel free to create a ticket to let others upvote it:)
Ups... I'm wrong. See http://youtrack.jetbrains.com/issue/WEB-674
See also https://gist.github.com/ulitink/9757354 for possible workaround