From 1e11c5c1ac34fffba2f6f2b72dcb37dc674752f3 Mon Sep 17 00:00:00 2001 From: Zack Elliott Date: Wed, 7 Sep 2022 17:42:31 -0700 Subject: [PATCH] Added a comment --- .../src/generators/DeclarationReferenceGenerator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api-extractor/src/generators/DeclarationReferenceGenerator.ts b/apps/api-extractor/src/generators/DeclarationReferenceGenerator.ts index 8b16a787ba5..49ce1124f75 100644 --- a/apps/api-extractor/src/generators/DeclarationReferenceGenerator.ts +++ b/apps/api-extractor/src/generators/DeclarationReferenceGenerator.ts @@ -272,6 +272,9 @@ export class DeclarationReferenceGenerator { const declaration: ts.Node | undefined = TypeScriptHelpers.tryGetADeclaration(symbol); const sourceFile: ts.SourceFile | undefined = declaration?.getSourceFile(); + // Note that it's possible for a symbol to be exported from an entry point as well as one or more + // namespaces. In that case, it's not clear what to choose as its parent. Today's logic is neither + // perfect nor particularly stable to API items being renamed and shuffled around. const entity: CollectorEntity | undefined = this._collector.tryGetEntityForSymbol(symbol); if (entity) { if (entity.exportedFromEntryPoint) {