Don't fall back to any when typing tuples

This commit is contained in:
Jason Freeman
2015-07-16 19:02:32 -07:00
parent 07af6ca414
commit ad67cd3199

View File

@@ -2274,10 +2274,6 @@ namespace ts {
// fact an iterable or array (depending on target language).
let elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false);
if (!declaration.dotDotDotToken) {
if (isTypeAny(elementType)) {
return elementType;
}
// Use specific property type when parent is a tuple or numeric index type when parent is an array
let propName = "" + indexOf(pattern.elements, declaration);
type = isTupleLikeType(parentType)