Ответ 1
Я попробовал кучу разных вещей, и это было лучшее, что я мог придумать.
Первая часть... документация publicMethod
на Class
. Сначала сделайте Class
a memberOf
namespace
, а затем используйте @lends
на Class.prototype
. Пример:
/**
* @namespace The original namespace
*/
var namespace = function () {
// private
/**
* @private
*/
function _privateMethod () {
};
/**
* This is the detail about the constructor
* @class This is the detail about the class
* @memberOf namespace
* @param {Object} argone The first argument
* @param {Object} argtwo The second argument
*/
var Class = function (argone, argtwo) {
/**
* A public member variable
*/
this.member = "a member";
};
Class.prototype =
/** @lends namespace.Class */
{
/** a public method
* @param {Object} argone The first argument
*/
publicMethod: function (argone) {
}
};
return {
Class: Class
}
}();
Теперь вторая часть... получив Class
, чтобы отобразиться как на namespace
. Я не уверен, как это сделать... извините! Он будет отображаться как namespace.Class
в индексе класса.