Skip to content

Commit f9a98d4

Browse files
committed
Small bug fix
1 parent d0393b0 commit f9a98d4

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

apps/api-extractor/src/enhancers/ValidationEnhancer.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,8 @@ export class ValidationEnhancer {
210210
continue;
211211
}
212212

213-
localName = rootSymbol.localName;
214-
215213
collectorEntity = collector.tryGetCollectorEntity(rootSymbol);
214+
localName = collectorEntity?.nameForEmit || rootSymbol.localName;
216215

217216
const referencedMetadata: SymbolMetadata = collector.fetchSymbolMetadata(referencedEntity);
218217
referencedReleaseTag = referencedMetadata.maxEffectiveReleaseTag;
@@ -222,7 +221,7 @@ export class ValidationEnhancer {
222221
// TODO: Currently the "import * as ___ from ___" syntax does not yet support doc comments
223222
referencedReleaseTag = ReleaseTag.Public;
224223

225-
localName = referencedEntity.localName;
224+
localName = collectorEntity?.nameForEmit || referencedEntity.localName;
226225
} else {
227226
continue;
228227
}
@@ -233,7 +232,7 @@ export class ValidationEnhancer {
233232
ExtractorMessageId.IncompatibleReleaseTags,
234233
`The symbol "${astDeclaration.astSymbol.localName}"` +
235234
` is marked as ${ReleaseTag.getTagName(declarationReleaseTag)},` +
236-
` but its signature references "${referencedEntity.localName}"` +
235+
` but its signature references "${localName}"` +
237236
` which is marked as ${ReleaseTag.getTagName(referencedReleaseTag)}`,
238237
astDeclaration
239238
);

build-tests/api-extractor-scenarios/etc/ambientNameConflict/api-extractor-scenarios.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
```ts
66

7-
// Warning: (ae-forgotten-export) The symbol "Promise" needs to be exported by the entry point index.d.ts
7+
// Warning: (ae-forgotten-export) The symbol "Promise_2" needs to be exported by the entry point index.d.ts
88
//
99
// @public (undocumented)
1010
export function ambientNameConflict(p1: Promise<void>, p2: Promise_2<void>): void;

build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// (undocumented)
1010
type AnotherForgottenExport = number;
1111

12-
// Warning: (ae-forgotten-export) The symbol "DuplicateName" needs to be exported by the entry point index.d.ts
12+
// Warning: (ae-forgotten-export) The symbol "DuplicateName_2" needs to be exported by the entry point index.d.ts
1313
//
1414
// @public (undocumented)
1515
export function anotherFunction(): DuplicateName_2;

build-tests/api-extractor-test-01/etc/api-extractor-test-01.api.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class ForgottenExportConsumer1 {
110110

111111
// @public (undocumented)
112112
export class ForgottenExportConsumer2 {
113-
// Warning: (ae-forgotten-export) The symbol "IForgottenExport" needs to be exported by the entry point index.d.ts
113+
// Warning: (ae-forgotten-export) The symbol "IForgottenExport_2" needs to be exported by the entry point index.d.ts
114114
//
115115
// (undocumented)
116116
test2(): IForgottenExport_2 | undefined;
@@ -203,5 +203,4 @@ export const VARIABLE: string;
203203
// @public
204204
export function virtual(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>): void;
205205

206-
207206
```

0 commit comments

Comments
 (0)