Skip to content

Commit f17ba81

Browse files
committed
Revert "Extend the implementation to handle TupleLike types"
This reverts commit b5139ab.
1 parent b5139ab commit f17ba81

File tree

3 files changed

+0
-61
lines changed

3 files changed

+0
-61
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22268,21 +22268,6 @@ namespace ts {
2226822268
else hasNonEndingSpreadElement = true;
2226922269
}
2227022270
}
22271-
else if (spreadType && isTupleLikeType(spreadType)) {
22272-
let i = 0, tupleEltType: Type | undefined;
22273-
while (tupleEltType = getTypeOfPropertyOfType(spreadType, "" + i as __String)) {
22274-
elementTypes.push(tupleEltType);
22275-
i++;
22276-
}
22277-
const stringIndexInfo = getIndexInfoOfType(spreadType, IndexKind.String);
22278-
const numberIndexInfo = getIndexInfoOfType(spreadType, IndexKind.Number);
22279-
if (stringIndexInfo || numberIndexInfo) {
22280-
if (stringIndexInfo) elementTypes.push(stringIndexInfo.type);
22281-
if (numberIndexInfo) elementTypes.push(numberIndexInfo.type);
22282-
if (i === elementCount - 1) hasEndingSpreadElement = true;
22283-
else hasNonEndingSpreadElement = true;
22284-
}
22285-
}
2228622271
else {
2228722272
if (inDestructuringPattern && spreadType) {
2228822273
// Given the following situation:

tests/cases/compiler/spliceTupleLikesWIntegers.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/cases/compiler/spliceTupleLikesWStrings.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)