documenting an angularjs/browserify project

Given the following AngularJS/Browserify app structure:
angular.module('myApp', [

module.exports=['SomeSubModule', function (SomeSubModule) {
     // do stuff with SomeSubModule

angular.module('', [])
     .factory('SomeSubModule', require('SomeSubModule.js'));

module.exports=function () {
     return {
          someMethod: function () {
               // do cool stuff

How would you go about documenting it, so that WebStorm can do proper code completion, i.e. when I type SomeSubModule in the main config.js function, it knows that there is a method named "someMethod" available?

1 comment
Comment actions Permalink

WebStorm doesn't yet support documentingAMD/commonJS stuff (
For now the suggested approach is using @class tag to annotate exported objects/functions, and then use inline JSDoc for parameter type - see


Please sign in to leave a comment.