Rush Stack商店博客活动
跳至主要内容

ae-unresolved-link

“无法解析 @link 引用。”

备注

当 TSDoc 声明引用无法解析时,就会发生这种情况。

例如,假设我们在以下示例中将 f1 误写为 g1

/**
* Some documentation that we want to inherit
*/
export function f1(): void {}

/**
* For more info, see {@link g2 | the f1 function}.
*/
export function f2(): void {}

// Warning: The @link reference could not be resolved: The package does not have an export "g2"

如何修复

更正引用。在上面的示例中,我们将修复 f2() 的注释以引用 f1,如下所示

/**
* For more info, see {@link f1 | the f1 function}.
*/
export function f2(): void {}

另请参阅