繁体   English   中英

我可以在许多单独的typedoc注释中共享链接的公共链接引用吗?

[英]Can I share common link-references for links in many, separated typedoc comments?

我有这样的情况:

/**
 * A Class.
 *
 * [Google] and [Wikipedia] enter a bar.
 *
 * [Google]: https://www.google.com
 * [Wikipedia]: https://en.wikipedia.org
 */
class MyClass {
  // ...
}


/**
 * Another class.
 *
 * I want to know more about [Google] and [Wikipedia].
 *
 * [Google]: https://www.google.com
 * [Wikipedia]: https://en.wikipedia.org
 */
class AnotherClass {
  // ...
}

如您所见,最好为我的“ 书目 ”提供唯一的资源,而不是在每个typedoc中重复相同的链接。 有什么办法可以实现?

在文档顶部,您可以按以下格式以正确的格式添加外部链接,因此无需一次又一次地重复添加链接。

 /**
    * @author  Daniele Repici
    * @version 1.0
    * @since   2019/09/18
    * [FormArray]: <a href="https://angular.io/api/forms/FormGroup</a>
    * [FormArray]: <a href="https://angular.io/api/forms/FormArray</a>
    */

不要使用{@link ...}或{@linkplain ...},因为它们是指向其他类和方法的javadocs的链接。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM