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



我有这样的情况:

/**
* 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 的链接。

相关内容

最新更新