【发布时间】:2013-05-30 00:30:54
【问题描述】:
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 只使用函数二十三。其余的都完全错过了。
我做错了什么?
【问题讨论】:
-
我以前从未使用过 JSDoc,但看了他们的文档,我不确定为什么你的任何东西都可以工作。我认为你需要回去阅读 JSDoc 的文档。例如,我认为
four应该记录为@namespace(对于您的 IIFE)。而且我认为你需要在特定的地方使用@name和@lends
标签: javascript documentation standards documentation-generation jsdoc