I already tried to make use of namespaces and the @memberOf tag, but in the generated API doc I still have no class members or methods at all.
Here is some example code:
/**
* Test file
* @namespace test
*/
/**
* my view model
* @class MyViewModel
* @memberOf test
*/
function MyViewModel() {
var self = this;
/**
* test observable
* @type {Object}
* @memberOf test.MyViewModel#
*/
self.testObservable = ko.observable();
/**
* test function
* @memberOf test.MyViewModel#
*/
self.testObservable = function() {
// do something
};
}
Your @memberof
tags would work if you used @memberof!
. The exclamation point forces jsdoc to follow what you give it. If you don't use the exclamation point, jsdoc will decide that it knows better than you do and ignore the tag. But using @memberof!
still makes it look funky. What you can do is remove the @memberof
tags and use @lends
as follows:
/**
* Test file
* @namespace test
*/
/**
* my view model
* @class MyViewModel
* @memberOf test
*/
function MyViewModel() {
/** @lends test.MyViewModel# */
var self = this;
/**
* test observable
* @type {Object}
*/
self.testObservable = ko.observable();
/**
* test function
*/
self.testObservable = function() {
// do something
};
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With