JSDoc @ignore 标签
目录
概述
@ignore标签表示在你的代码中的注释不应该出现在文档中,注释会被直接忽略。这个标签优先于所有其他标签。
对于大多数JSDoc模板来说,包括默认模板,@ignore标签具有以下效果:
- 如果您和
@class或@module标签结合使用@ignore标签,整个类或模块的JSDoc注释文档会被省略。 - 如果您和
@namespace标签结合使用@ignore标签,你还必须将@ignore标签添加到任何子类和命名空间中。否则,会显示子类和命名空间的文档,但不完整。
示例
In the following example, Jacket and Jacket#color will not appear in the documentation.
在下面的例子中,Jacket 和 Jacket#color 将不会出现在文档中:
@ignore tag/**
* @class
* @ignore
*/
function Jacket() {
/** The jacket's color. */
this.color = null;
}
在下面的例子中, Clothes
命名空间包含一个Jacket类。@ignore标签必须添加到Clothes和Clothes.Jacket中。Clothes,
Clothes.Jacket和Clothes.Jacket#color将不会出现在文档。
/**
* @namespace
* @ignore
*/
var Clothes = {
/**
* @class
* @ignore
*/
Jacket: function() {
/** The jacket's color. */
this.color = null;
}
};