Out of bounds tuple elements have type 'undefined'

This commit is contained in:
Anders Hejlsberg committed 2019-06-21 18:00:26 -10:00
1 parent 2c458c0d1c
commit 7cdc65b2a5
1 file changed
+1 -1
+1 -1
View File
@@ -14440,7 +14440,7 @@ namespace ts {
if (propType) {
return propType;
}
if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
if (everyType(type, isTupleType)) {
return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
}
return undefined;