Skip to content

Commit 5288c37

Browse files
committed
Rest parameter with fixed size tuple should be same as regular parameters
1 parent 9658b47 commit 5288c37

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20132,10 +20132,7 @@ namespace ts {
2013220132
if (pos - paramCount < getLengthOfTupleType(restType)) {
2013320133
return restType.typeArguments![pos - paramCount];
2013420134
}
20135-
const tupleRestType = getRestTypeOfTupleType(restType);
20136-
if (tupleRestType) {
20137-
return tupleRestType;
20138-
}
20135+
return getRestTypeOfTupleType(restType);
2013920136
}
2014020137
return getIndexTypeOfType(restType, IndexKind.Number);
2014120138
}

0 commit comments

Comments
 (0)