语法
🌐 Syntax
@kind <kindName>
其中 <kindName> 是以下之一:
🌐 where <kindName> is one of:
- 类
- 常量
- 事件
- 外部
- 文件
- 函数
- 成员
- 混入
- 模块
- 命名空间
- 类型定义
概述
🌐 Overview
@kind 标签用于记录正在记录的符号的 类型(例如,类或模块)。符号的 类型 与符号的 数据类型(例如,字符串或布尔值)不同。
🌐 The @kind tag is used to document what kind of symbol is being documented (for example, a class or a module). The kind of symbol differs from a symbol's type (for example, string or boolean).
通常你不需要 @kind 标签,因为符号的类型由 doclet 中的其他标签决定。例如,使用 @class 标签会自动意味着“@kind class”,而使用 @namespace 标签意味着“@kind namespace”。
🌐 Usually you do not need the @kind tag, because the symbol's kind is determined by other tags in the doclet. For example, using the @class tag automatically implies "@kind class", and using the @namespace tag implies "@kind namespace".
示例
🌐 Examples
// The following examples produce the same result:
/**
* A constant.
* @kind constant
*/
const asdf = 1;
/**
* A constant.
* @constant
*/
const asdf = 1;
在标签种类冲突的情况下(例如,同时使用 @module,它将种类设置为“module”,以及 @kind constant,它将种类设置为“constant”),最后一个标签决定种类。
🌐 In the case of tags with conflicting kinds (for example, using both @module, which sets the kind to "module", and "@kind constant" which sets the kind to "constant"), the last tag determines the kind.
/**
* This will show up as a constant
* @module myModule
* @kind constant
*/
/**
* This will show up as a module.
* @kind constant
* @module myModule
*/