Skip to content

Commit b61eaf7

Browse files
committed
Inline function that is called once
1 parent 9ba0668 commit b61eaf7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9598,10 +9598,6 @@ namespace ts {
95989598
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
95999599
}
96009600

9601-
function areAllParametersOptionalAfter(signature: Signature, parameterIndex: number) {
9602-
return parameterIndex >= signature.minArgumentCount;
9603-
}
9604-
96059601
function isSupertypeOfEach(candidate: Type, types: Type[]): boolean {
96069602
for (const t of types) {
96079603
if (candidate !== t && !isTypeSubtypeOf(t, candidate)) return false;
@@ -14653,7 +14649,7 @@ namespace ts {
1465314649
// If spread arguments are present, check that they correspond to a rest parameter. If so, no
1465414650
// further checking is necessary.
1465514651
if (spreadArgIndex >= 0) {
14656-
return isRestParameterIndex(signature, spreadArgIndex) || areAllParametersOptionalAfter(signature, spreadArgIndex);
14652+
return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
1465714653
}
1465814654

1465914655
// Too many arguments implies incorrect arity.

0 commit comments

Comments
 (0)