繁体   English   中英

如何使用 Typedoc 链接到另一个模块

[英]How to link to another module using Typedoc

在 Typedoc 中,您可以使用以下方法链接到另一个 class:

  • [[ClassName]]
  • {@link ClassName}

那个 class 甚至可以属于另一个模块。

但是我不知道如何链接到

  • 另一个模块
  • 从另一个模块导出的 function

所以假设你有 2 个d.ts文件:

Foo.d.ts

/**
 * I want to link to:
 * the [[Bar]] module //does not work
 * the {@link Bar} module //does not work
 * the [[Bar.foobar]] function //does not work
 * the {@link Bar.foobar]] function //does not work
 */
export class Foo{}

bar.d.ts

export function foobar(): string;

执行此操作的正确语法是什么? 或者 Typedoc 不支持这个?

看起来像是 Typedoc 的一个缺点。 创建了一个拉取请求来解决这个问题。

如果此拉取请求被接受,您应该能够使用{@link "modulename"}链接到您只有定义文件的模块(是的,需要引号)。

暂无
暂无

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

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