Search code examples
javascriptdocumentationjsdoc

JsDoc toolkit and Namespace - Warning trying to .. without


I am using jsdoc-toolkit with the namespace library of Mike Koss. The code looks like this

namespace.module('a.b', // this is the namespace

// @param {Object} exports visible classes within this namespace
// @param {function} required other namespaces
function (exports, require) {

var entityBase = require("a.base");
var util = require("a.util");

// @class BlaBla
// @constructor
// @property {String} ..
// @property {String} ..
// @property {String} ..
// @property {..} ....
// @param {Array} ...
// @param {X} [optionalParam]
exports.MyClass = function (...) {

Creating documentation I get the following message and no documentation is created at all for this class.

>> WARNING: Trying to document exports.MyClass without first documenting exports.

I have tried to overcome the issue with the param lines - no success.

// @param {Object} exports visible classes within this namespace
// @param {function} required other namespaces
function (exports, require) {

Any idea how to overcome the issue?


Solution

  • I have switched to JsDoc 3 (https://github.com/micmath/jsdoc#readme). This support modules and hence the above namespace library.