如何用JSDoc编写函数文档
How to document functions with JSDoc
JSDoc似乎没有选择我的大多数功能。下面是一个例子:
/**
* Function one.
*/
(function one() {
/**
* Function two.
*/
function two() {
/**
* Function three.
*/
function three() {
}
}
})();
var four = {
/**
* Function five/six.
*/
five: function six() {
},
/**
* Function seven/eight.
*/
seven: function eight() {
},
};
nine.ten = {
/**
* Function eleven/twelve.
*/
eleven: function twelve() {
/**
* Function thirteen/fourteen.
*/
var thirteen = function fourteen() {
};
},
/**
* Function fifteen/sixteen.
*/
fifteen: function sixteen() {
},
};
/**
* Function eighteen
*/
seventeen(function eighteen() {
});
/**
* Function twenty.
*/
nineteen(function twenty() {
/**
* Function twentyTwo.
*/
twentyOne(function twentyTwo() {
});
});
/**
* Function twentyThree.
*/
function twentyThree() {
}
JSDoc只拾取函数23。
我做错了什么?
这是一个将从JSDoc(3)获得更多输出的示例:
/**
* Function one.
* @namespace one
*/
(function one() {
/**
* Function two.
* @namespace two
* @memberof one
*/
function two() {
/**
* Function three.
* @memberof one.two
*/
function three() {
}
}
})();
相关文章:
- 将文档实体传递给JavaScript函数
- 使用window[variablename]()调用函数;在文档中.准备
- 函数不't在jquery文档就绪时执行
- 如何从 html 文档中调用 yahoo weather api javascript 函数
- 如何编写单个 Jquery 函数以在文档更改和就绪事件时触发
- 使用 JQuery 修改函数写入文档的数据
- 在 $( 文档 ).ready 函数中使用字符串名称调用 javascript 函数
- 将文档对象传递给函数
- 这个文档语法在MDN中对JavaScript函数意味着什么
- 为什么不是'我的函数未按预期在文档加载时运行
- 挂钩文档.使用函数原型创建元素
- 如何在文档准备函数中调用变量的click函数
- window.opener调用函数给了我一个文档.getElementById(..)为null
- JavaScript:从子html文档调用函数
- 为什么要重置文档getter函数
- Javascript:如何在函数运行完成之前对文档进行更改
- NodeJS的MongoDB函数文档
- 如何用JSDoc编写函数文档
- 函数文档和语法- ECMA262
- Javascript函数文档.createElement(tagName[, options])没有按预期工作