mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-25 15:01:36 -05:00
Don't fall back to any when typing tuples
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user