We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0226b66 commit 52293edCopy full SHA for 52293ed
1 file changed
src/compiler/checker.ts
@@ -13128,10 +13128,8 @@ namespace ts {
13128
const targetCount = getParameterCount(target);
13129
const sourceRestType = getEffectiveRestType(source);
13130
const targetRestType = getEffectiveRestType(target);
13131
- const paramCount = targetRestType ? Math.min(targetCount - 1, sourceCount) :
13132
- sourceRestType ? targetCount :
13133
- Math.min(sourceCount, targetCount);
13134
-
+ const targetNonRestCount = targetRestType ? targetCount - 1 : targetCount;
+ const paramCount = sourceRestType ? targetNonRestCount : Math.min(sourceCount, targetNonRestCount);
13135
const sourceThisType = getThisTypeOfSignature(source);
13136
if (sourceThisType) {
13137
const targetThisType = getThisTypeOfSignature(target);
0 commit comments