@kind¶
-
.. @kind::
¶ - 语法
@kind <kindName>
其中
<kindName>
是其中之一:class
constant
event
external
file
function
member
mixin
module
namespace
typedef
- 概述
@kind标记用于记录正在记录的* kind *符号(例如, 类或模块). 符号的*种类*与符号的*类型*不同(例如, 字符串或布尔值).
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”.- 示例
- Using @kind¶
// The following examples produce the same result: /** * A constant. * @kind constant */ const asdf = 1; /** * A constant. * @constant */ const asdf = 1;
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.Conflicting @kind statements¶/** * This will show up as a constant * @module myModule * @kind constant */ /** * This will show up as a module. * @kind constant * @module myModule */