JSDoc,记录存储在对象中的函数
JSDoc, documenting functions stored inside an object
当函数存储在对象中时,我无法在 JSDoc 中显示这些函数。所以我有类似的东西:
/**
*/
var methods = {};
/**
Get all resources
*/
methods.getResources = function(){
return name;
}
如何在 JSDoc 中显示 getResources 函数?我试过将 @class
添加到没有运气的方法中。
@namespace
and @memberOf
应该是您要找的。
/**
* @namespace methods
*/
var methods = {};
/**
* Get all resources
* @memberOf methods
*/
methods.getResources = function(){
return name;
}
当函数存储在对象中时,我无法在 JSDoc 中显示这些函数。所以我有类似的东西:
/**
*/
var methods = {};
/**
Get all resources
*/
methods.getResources = function(){
return name;
}
如何在 JSDoc 中显示 getResources 函数?我试过将 @class
添加到没有运气的方法中。
@namespace
and @memberOf
应该是您要找的。
/**
* @namespace methods
*/
var methods = {};
/**
* Get all resources
* @memberOf methods
*/
methods.getResources = function(){
return name;
}