Skip to content

Commit ad67cd3

Browse files
committed
Don't fall back to any when typing tuples
1 parent 07af6ca commit ad67cd3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,10 +2274,6 @@ namespace ts {
22742274
// fact an iterable or array (depending on target language).
22752275
let elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false);
22762276
if (!declaration.dotDotDotToken) {
2277-
if (isTypeAny(elementType)) {
2278-
return elementType;
2279-
}
2280-
22812277
// Use specific property type when parent is a tuple or numeric index type when parent is an array
22822278
let propName = "" + indexOf(pattern.elements, declaration);
22832279
type = isTupleLikeType(parentType)

0 commit comments

Comments
 (0)