概述
¥Overview
@ignore 标记表示代码中的符号永远不应出现在文档中。该标签优先于所有其他标签。
¥The @ignore tag indicates that a symbol in your code should never appear in the documentation.
This tag takes precedence over all others.
对于大多数 JSDoc 模板,包括默认模板,@ignore 标签具有以下作用:
¥For most JSDoc templates, including the default template, the @ignore tag has the following
effects:
-
如果将
@ignore标签与@class或@module标签一起使用,则文档中将省略整个类或模块。¥If you use the
@ignoretag with the@classor@moduletag, the entire class or module will be omitted from the documentation. -
如果将
@ignore标记与@namespace标记一起使用,则还必须将@ignore标记添加到任何子类和命名空间。否则,你的文档将显示子类和名称空间,但名称不完整。¥If you use the
@ignoretag with the@namespacetag, you must also add the@ignoretag to any child classes and namespaces. Otherwise, your documentation will show the child classes and namespaces, but with incomplete names.
示例
¥Examples
在以下示例中,Jacket 和 Jacket#color 将不会出现在文档中。
¥In the following example, Jacket and Jacket#color will not appear in the documentation.
/**
* @class
* @ignore
*/
function Jacket() {
/** The jacket's color. */
this.color = null;
}
在以下示例中,Clothes 命名空间包含 Jacket 类。@ignore 标签必须添加到 Clothes 和 Clothes.Jacket 中。Clothes、Clothes.Jacket 和 Clothes.Jacket#color 不会出现在文档中。
¥In the following example, the Clothes namespace contains a Jacket class. The @ignore tag must
be added to both Clothes and Clothes.Jacket. Clothes, Clothes.Jacket, and
Clothes.Jacket#color will not appear in the documentation.
/**
* @namespace
* @ignore
*/
var Clothes = {
/**
* @class
* @ignore
*/
Jacket: function() {
/** The jacket's color. */
this.color = null;
}
};