See if the following works for you. Note that your code snippet is not valid JavaScript in and of itself because namespace
is not defined anywhere. At any rate, jsdoc will process it. What I've had to do was to be more verbose than I would have otherwise been. A few notes:
You could put the doclet that defines
ClassA
in front of the line that hasnamespace.ClassA
.The
@lends
tag needs a full path:/** @lends namespace.ClassB.prototype */
Here's the code:
/**
* @namespace namespace
*/
namespace.ClassA = Class.extend({
name : "",
/**
* @constructor
* @memberof namespace
* @name ClassA
* @param name Blah.
*/
init: function(name){
this.name = name;
}
});
/**
* @constructor
* @memberof namespace
* @name ClassB
*/
namespace.ClassB = ClassA.extend(/** @lends namespace.ClassB.prototype */ {
/**
* @method
*/
sayName : function(){
console.log(this.name);
}
});