diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 973d4271e25..09450cac8e8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21201,17 +21201,22 @@ namespace ts { } arrayOrTupleConstituent = constituent; } - else { - const properties = getPropertiesOfType(constituent); - for (const property of properties) { - if (isNumericLiteralName(property.escapedName) || property.escapedName === "length" as __String) { + } + + if (arrayOrTupleConstituent) { + for (const constituent of (type as IntersectionType).types) { + if (constituent !== arrayOrTupleConstituent) { + const properties = getPropertiesOfType(constituent); + for (const property of properties) { + if (isNumericLiteralName(property.escapedName) || property.escapedName === "length" as __String) { + return undefined; + } + } + + if (some(getIndexInfosOfType(constituent))) { return undefined; } } - - if (some(getIndexInfosOfType(constituent))) { - return undefined; - } } }