mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Out of bounds tuple elements have type 'undefined'
This commit is contained in:
1 parent
2c458c0d1c
commit
7cdc65b2a5
1 file changed
+1
-1
@@ -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