0

I'm trying to document a node module that exports a function, but I'm not getting any reference to the function in my jsdocs output.

The output, using the default template, Just looks like this:

Module: testModule


With nothing under the heading.

Here's what I've tried so far:

try 1

/**
 * @module testModule
 */
'use strict';

/**
 * @function module:testModule
 * @param {String} x Log string
 */
module.exports = function(x) {
    console.log(x);
};

try 2

/**
 * @module testModule
 */
'use strict';

/**
 * @param {String} x Log string
 */
module.exports = function(x) {
    console.log(x);
};
hal
  • 4,845
  • 7
  • 34
  • 57

1 Answers1

0

Well, this seems like a bug, but I found a work around.

It will only work if you include a description. Like this:

/**
 * @module testModule
 */
'use strict';

/**
 * Some Description
 *
 * @function module:testModule
 * @param {String} x Log string
 */
module.exports = function(x) {
    console.log(x);
};
hal
  • 4,845
  • 7
  • 34
  • 57