Skip to content

Commit ca33f40

Browse files
committed
Fix lint, other style conformance.
1 parent bf5b762 commit ca33f40

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/compiler/checker.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7087,18 +7087,19 @@ namespace ts {
70877087
}
70887088
constructSignatures = concatenate(constructSignatures, signatures);
70897089
}
7090-
70917090
callSignatures = concatenate(callSignatures, getSignaturesOfType(t, SignatureKind.Call));
70927091
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, IndexKind.String));
70937092
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, IndexKind.Number));
70947093
}
7095-
70967094
callSignatures = intersectCallSignatures(callSignatures);
7097-
70987095
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
70997096
}
71007097

71017098
function intersectCallSignatures(callSignatures: ReadonlyArray<Signature>): ReadonlyArray<Signature> {
7099+
if (callSignatures.length === 0) {
7100+
return callSignatures;
7101+
}
7102+
71027103
// Overloads that differ only be return type make no sense. So:
71037104
// 1. Group all the call signatures by their parameter types. Each group is an overload.
71047105
// 2. Create a new signature for each group where the return type is the intersection
@@ -7115,7 +7116,8 @@ namespace ts {
71157116
});
71167117
if (matchingGroup === undefined) {
71177118
groups.push([callSignature]);
7118-
} else {
7119+
}
7120+
else {
71197121
matchingGroup.push(callSignature);
71207122
}
71217123
});

0 commit comments

Comments
 (0)