rushstack
rushstack copied to clipboard
[api-extractor] Items with non-inline `export`s have incorrect canonical references
Summary
Api extractor emits incorrect canonical reference navigation paths for api items that don't have inline exports. Items that have inline exports and items that export items via export { A, B, C }
should all have the same canonical reference paths.
Repro steps
Run API extractor on the following declaration file:
class A {
foo: string;
}
interface B {
bar: A;
}
export { A, B };
The output api json shows B#bar
s canonical reference as a local member instead of an exported member:
Expected result:
B#bar
's canonical reference is <packageName>!A:class
Actual result:
B#bar
's canonical reference is <packageName>!~A:class
Details
After some investigating the issue is most likely caused by some code within DeclarationReferenceGenerator
.
Standard questions
Question | Answer |
---|---|
@microsoft/api-extractor version? |
7.28.3 |
Operating system? | macOS |
API Extractor scenario? | docs (.api.json) |
Would you consider contributing a PR? | Yes |
TypeScript compiler version? | 4.7.4 |
Node.js version (node -v )? |
16.13.2 |
I wonder if this will be addressed by https://github.com/microsoft/tsdoc/pull/325. @rbuckton?