【问题标题】:Tagging / generating a method link in typedoc?在 typedoc 中标记/生成方法链接?
【发布时间】:2018-12-07 20:30:26
【问题描述】:

我们应该使用什么标记来标记某个东西是 typedoc 中的方法。例如我有以下评论:

  /**
   * The index for all of the ValidationContext instances.
   * Not meant to be accessed directly.  Only decorators should
   * be modifying the state of the cache by using the addValidationContext() method.
   */

我如何告诉 typedoc addValidationContext 是类的方法?

【问题讨论】:

    标签: javascript typescript jsdoc typedoc


    【解决方案1】:

    TypeDoc 有两种设置链接的方法。对于方法和属性,您应该能够编写 [[ClassName.methodName]]{@link ClassName.methodName} 并将其转换为链接。

    如果您查看 Renderer 类的 doc comment,您会看到在 api documentation site 中呈现的示例。

    【讨论】:

      【解决方案2】:

      您可以使用 JSDoc {@link}@see 指令。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-05-09
        • 1970-01-01
        • 2017-04-16
        • 2020-01-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多