Skip to content

Commit 6bb00df

Browse files
committed
Fix regression in ExcerptBuilder.ts
1 parent 551b942 commit 6bb00df

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/api-extractor-model/src/model/ApiConstructSignature.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export class ApiConstructSignature extends ApiTypeParameterListMixin(ApiParamete
7474
return `|${ApiItemKind.ConstructSignature}|${overloadIndex}`;
7575
}
7676

77-
7877
/** @override */
7978
public get kind(): ApiItemKind {
8079
return ApiItemKind.ConstructSignature;

apps/api-extractor/src/generators/ExcerptBuilder.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class ExcerptBuilder {
121121

122122
if (span.kind === ts.SyntaxKind.Identifier) {
123123
const name: ts.Identifier = span.node as ts.Identifier;
124-
if (!ExcerptBuilder._isDeclaration(name)) {
124+
if (!ExcerptBuilder._isDeclarationName(name)) {
125125
canonicalReference = state.referenceGenerator.getDeclarationReferenceForIdentifier(name);
126126
}
127127
}
@@ -214,6 +214,10 @@ export class ExcerptBuilder {
214214
state.disableMergingForNextToken = false;
215215
}
216216

217+
private static _isDeclarationName(name: ts.Identifier): boolean {
218+
return ExcerptBuilder._isDeclaration(name.parent) && name.parent.name === name;
219+
}
220+
217221
private static _isDeclaration(node: ts.Node): node is ts.NamedDeclaration {
218222
switch (node.kind) {
219223
case ts.SyntaxKind.FunctionDeclaration:

0 commit comments

Comments
 (0)