加载中...

@kind


描述: 标识的类型。

Syntax(语法)

@kind <kindName>

<kindName>取值为:

  • class
  • constant
  • event
  • external
  • file
  • function
  • member
  • mixin
  • module
  • namespace
  • typedef

Overview(概述)

@kind标签是用来指明什么样的标识符被描述(例如,一类或模块)。标识符kind 不同于标识符type(例如,字符串或布尔)。

通常你不需要@kind标签,因为标识符的kind是由doclet的其他标记来确定。例如,使用@class标签自动意味着“@kind class”,使用@namespace标签则意味着“@kind namespace”。

Examples(例子)

例如,使用 @kind:

  1. // The following examples produce the same result:
  2. /**
  3. * A constant.
  4. * @kind constant
  5. */
  6. const asdf = 1;
  7. /**
  8. * A constant.
  9. * @constant
  10. */
  11. const asdf = 1;

kind标签可能引起冲突(例如,使用 @module,表示他的kind为"module",同时,又使用了"@kind constant",表示他的kind为"constant"),在这种情况下最后的标签决定kind 的值。

例如,冲突的@kind语句:

  1. /**
  2. * This will show up as a constant
  3. * @module myModule
  4. * @kind constant
  5. */
  6. /**
  7. * This will show up as a module.
  8. * @kind constant
  9. * @module myModule
  10. */

还没有评论.