So I have several object definitions that work like this:
(function () {
var parent= constructors.Parent.prototype;
/**
* Creates an instance of Child.
*
* @constructor
* @augments Parent
* @this {Child}
* @param {object} settings
*/
var Child= function(settings) {
constructors.Parent.apply(this, arguments); //calling parent constructor
//constructor code
}
Child.prototype= new constructors.Parent();
/**
* Method1
*
* @this {Child}
* @param {string} param1
* @param {number} param2
*/
Child.prototype.method1= function(param1, param2) {
parent.method1.apply(this,arguments); //calls "super"
//method code
}
constructors.Child= Child;
}());
I do all this so that only global variable is ‘constructors’ and so that I don’t have to say ‘construtors.Child’ all the time. But JSDoc3 is ignoring my comments and generates nothing on this code. Anyone knows any special tags to fix this? I don’t mind if the JSDoc shows my class name as ‘Child’ or ‘constructors.Child’, either way is fine.
I’m not sure if this is the right way to do it, but it worked:
On another file I now have the following:
And in the file mentioned before I now have: