Skip to content

Commit b040ea6

Browse files
committed
One more CR fix
1 parent dd63656 commit b040ea6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12882,11 +12882,8 @@ namespace ts {
1288212882
if (propType) {
1288312883
return propType;
1288412884
}
12885-
if (everyType(type, isTupleType)) {
12886-
const restType = mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
12887-
if (restType !== undefinedType) {
12888-
return restType;
12889-
}
12885+
if (everyType(type, isTupleType) && !everyType(type, t => !(<TupleTypeReference>t).target.hasRestElement)) {
12886+
return mapType(type, t => getRestTypeOfTupleType(<TupleTypeReference>t) || undefinedType);
1289012887
}
1289112888
return undefined;
1289212889
}

0 commit comments

Comments
 (0)