Skip to content

Commit 7cdc65b

Browse files
committed
Out of bounds tuple elements have type 'undefined'
1 parent 2c458c0 commit 7cdc65b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14440,7 +14440,7 @@ namespace ts {
1444014440
if (propType) {
1444114441
return propType;
1444214442
}
14443-
if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
14443+
if (everyType(type, isTupleType)) {
1444414444
return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
1444514445
}
1444614446
return undefined;

0 commit comments

Comments
 (0)