We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd63656 commit b040ea6Copy full SHA for b040ea6
src/compiler/checker.ts
@@ -12882,11 +12882,8 @@ namespace ts {
12882
if (propType) {
12883
return propType;
12884
}
12885
- if (everyType(type, isTupleType)) {
12886
- const restType = mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
12887
- if (restType !== undefinedType) {
12888
- return restType;
12889
- }
+ if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
+ return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
12890
12891
return undefined;
12892
0 commit comments