Skip to content

Commit 36774d6

Browse files
committed
Fix a bug where a function with only one declaration was assigned an overloadIndex of 0 instead of 1
1 parent 9846fc3 commit 36774d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ export class ApiModelGenerator {
775775
private _getOverloadIndex(astDeclaration: AstDeclaration): number {
776776
const allDeclarations: ReadonlyArray<AstDeclaration> = astDeclaration.astSymbol.astDeclarations;
777777
if (allDeclarations.length === 1) {
778-
return 0; // trivial case
778+
return 1; // trivial case
779779
}
780780

781781
let overloadIndex: number | undefined = this._cachedOverloadIndexesByDeclaration.get(astDeclaration);

0 commit comments

Comments
 (0)