* Return true if given node is an expression consisting of an identifier (possibly parenthesized) * that references a for-in variable for an object with numeric property names.
(expr)
| 75198 | * that references a for-in variable for an object with numeric property names. |
| 75199 | */ |
| 75200 | function isForInVariableForNumericPropertyNames(expr) { |
| 75201 | var e = ts.skipParentheses(expr); |
| 75202 | if (e.kind === 79 /* SyntaxKind.Identifier */) { |
| 75203 | var symbol = getResolvedSymbol(e); |
| 75204 | if (symbol.flags & 3 /* SymbolFlags.Variable */) { |
| 75205 | var child = expr; |
| 75206 | var node = expr.parent; |
| 75207 | while (node) { |
| 75208 | if (node.kind === 243 /* SyntaxKind.ForInStatement */ && |
| 75209 | child === node.statement && |
| 75210 | getForInVariableSymbol(node) === symbol && |
| 75211 | hasNumericPropertyNames(getTypeOfExpression(node.expression))) { |
| 75212 | return true; |
| 75213 | } |
| 75214 | child = node; |
| 75215 | node = node.parent; |
| 75216 | } |
| 75217 | } |
| 75218 | } |
| 75219 | return false; |
| 75220 | } |
| 75221 | function checkIndexedAccess(node, checkMode) { |
| 75222 | return node.flags & 32 /* NodeFlags.OptionalChain */ ? checkElementAccessChain(node, checkMode) : |
| 75223 | checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); |
no test coverage detected
searching dependent graphs…