One more CR fix

This commit is contained in:
Anders Hejlsberg
2018-10-11 10:13:36 -07:00
parent dd6365615d
commit b040ea66d1

View File

@@ -12882,11 +12882,8 @@ namespace ts {
if (propType) {
return propType;
}
if (everyType(type, isTupleType)) {
const restType = mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
if (restType !== undefinedType) {
return restType;
}
if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
}
return undefined;
}