mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Out of bounds tuple elements have type 'undefined'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user