I'm presently documenting my code with JSDoc Toolkit, but it's not quite right - in particular, it seems to struggle with accurately specifying namespaces. Let's say each of their files contains two simple classes:
lib/database/foo.js:
/** @class */
function Foo(...) {...}
/** @function ... */
Foo.prototype.init(..., cb) { return cb(null, ...); };
module.exports = foo;
And then something inherited lib/database/bar.js:
var Foo = require('./foo');
/**
* @class
* @augments Foo
*/
function Bar(....) {...}
util.inherits(Bar, Foo);
Bar.prototype.moreInit(..., cb) { return cb(null, ...); };
This is displayed simply as Foo and Bar in the generated documentation, without the leading database (or lib.database), which is required when you don't have everything in a global scope.
I've tried both the @namespace and @name databases.
It's a waste of time, but it doesn't turn out well.
Any suggestions for improving JSDoc's output or finding a new tool that works better with Node.js? (I skimmed over Natural Docs and JSDuck, as well as a few others that appeared to be out of date...)