概述
🌐 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标签一起使用,整个类或模块将从文档中省略。 - 如果你将
@ignore标签与@namespace标签一起使用,你还必须在任何子类和命名空间中添加@ignore标签。否则,你的文档将显示子类和命名空间,但名称不完整。
示例
🌐 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;
}
};