Out of bounds tuple elements have type 'undefined'
This commit is contained in:
parent
2c458c0d1c
commit
7cdc65b2a5
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue