如何使用 Typedoc link 到另一个模块

How to link to another module using Typedoc

在 Typedoc 中,您可以 link 到另一个 class 使用:

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

但是我不知道如何link到

所以假设您有 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 中的一个缺点。 创建了一个 pull request 来解决这个问题。

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