Reputation: 388
I have a class named FileDownloader
and I've tried documenting it, but the properties and method declared using prototype
aren't generated in the output file.
As stated on the title, I use jsdoc 3.3.0-alpha5.
Here's the code:
/**
* @class
* @memberOf module:utils
*/
FileDownloader = function() {};
/**
* @type {Boolean}
*/
FileDownloader.prototype.overwrite = false;
/**
* @type {String}
*/
FileDownloader.prototype.dir = config.dealImagePath;
/**
* @param {String} url
* @param {Function} done
* @param {Object} done.err
* @param {String} done.file
*/
FileDownloader.prototype.download = function(url, done) {
//...
};
Here is the generated document:
new FileDownloader()
| Source: path/to/file.js
Any idea?
Upvotes: 4
Views: 1743
Reputation: 351
The reason is memberOf
in FileDownloader description.
You should set module before, all symbols in the file are assumed to be members of the module. http://usejsdoc.org/tags-module.html
Like this
/** @module utils */
/**
* @class
*/
var FileDownloader = function() {};
/**
* @type {Boolean}
*/
FileDownloader.prototype.overwrite = false;
...
Upvotes: 1