ae-cyclic-inherit-doc
"@inheritDoc
标记用于___引用其自身的声明”。
备注
@inheritDoc
标记通过从另一个声明中复制文档内容来节省打字。另一个声明使用 TSDoc 声明引用来指定。但是,如果另一个引用引用回原始声明,则会报告 ae-cyclic-inherit-doc
错误。
自引用可以很简单
/**
* {@inheritDoc f1}
* @public
*/
export function f1(): void {}
// Warning: The "@inheritDoc" tag for "f1" refers to its own declaration.
或者它可能是间接的
/**
* {@inheritDoc f2}
* @public
*/
export function f1(): void {}
/**
* {@inheritDoc f3}
* @public
*/
export function f2(): void {}
/**
* {@inheritDoc f1}
* @public
*/
export function f3(): void {}
// Warning: The "@inheritDoc" tag for "f1" refers to its own declaration.
如何修复
删除或更改其中一个 @inheritDoc
标记以消除循环。