(node, declaredType, initialType, flowContainer)
| 69281 | // leftmost identifier followed by zero or more property names separated by dots. |
| 69282 | // The result is undefined if the reference isn't a dotted name. |
| 69283 | function getFlowCacheKey(node, declaredType, initialType, flowContainer) { |
| 69284 | switch (node.kind) { |
| 69285 | case 79 /* SyntaxKind.Identifier */: |
| 69286 | if (!ts.isThisInTypeQuery(node)) { |
| 69287 | var symbol = getResolvedSymbol(node); |
| 69288 | return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined; |
| 69289 | } |
| 69290 | // falls through |
| 69291 | case 108 /* SyntaxKind.ThisKeyword */: |
| 69292 | return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType)); |
| 69293 | case 230 /* SyntaxKind.NonNullExpression */: |
| 69294 | case 212 /* SyntaxKind.ParenthesizedExpression */: |
| 69295 | return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); |
| 69296 | case 161 /* SyntaxKind.QualifiedName */: |
| 69297 | var left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); |
| 69298 | return left && left + "." + node.right.escapedText; |
| 69299 | case 206 /* SyntaxKind.PropertyAccessExpression */: |
| 69300 | case 207 /* SyntaxKind.ElementAccessExpression */: |
| 69301 | var propName = getAccessedPropertyName(node); |
| 69302 | if (propName !== undefined) { |
| 69303 | var key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); |
| 69304 | return key && key + "." + propName; |
| 69305 | } |
| 69306 | } |
| 69307 | return undefined; |
| 69308 | } |
| 69309 | function isMatchingReference(source, target) { |
| 69310 | switch (target.kind) { |
| 69311 | case 212 /* SyntaxKind.ParenthesizedExpression */: |
no test coverage detected
searching dependent graphs…