File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -9598,10 +9598,6 @@ namespace ts {
9598
9598
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
9599
9599
}
9600
9600
9601
- function areAllParametersOptionalAfter(signature: Signature, parameterIndex: number) {
9602
- return parameterIndex >= signature.minArgumentCount;
9603
- }
9604
-
9605
9601
function isSupertypeOfEach(candidate: Type, types: Type[]): boolean {
9606
9602
for (const t of types) {
9607
9603
if (candidate !== t && !isTypeSubtypeOf(t, candidate)) return false;
@@ -14653,7 +14649,7 @@ namespace ts {
14653
14649
// If spread arguments are present, check that they correspond to a rest parameter. If so, no
14654
14650
// further checking is necessary.
14655
14651
if (spreadArgIndex >= 0) {
14656
- return isRestParameterIndex(signature, spreadArgIndex) || areAllParametersOptionalAfter(signature, spreadArgIndex) ;
14652
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount ;
14657
14653
}
14658
14654
14659
14655
// Too many arguments implies incorrect arity.
You can’t perform that action at this time.
0 commit comments