(node)
| 161577 | return symbolId; |
| 161578 | } |
| 161579 | function checkForUsedDeclarations(node) { |
| 161580 | // If this node is entirely within the original extraction range, we don't need to do anything. |
| 161581 | if (node === targetRange.range || (isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0)) { |
| 161582 | return; |
| 161583 | } |
| 161584 | // Otherwise check and recurse. |
| 161585 | var sym = ts.isIdentifier(node) |
| 161586 | ? getSymbolReferencedByIdentifier(node) |
| 161587 | : checker.getSymbolAtLocation(node); |
| 161588 | if (sym) { |
| 161589 | var decl = ts.find(visibleDeclarationsInExtractedRange, function (d) { return d.symbol === sym; }); |
| 161590 | if (decl) { |
| 161591 | if (ts.isVariableDeclaration(decl)) { |
| 161592 | var idString = decl.symbol.id.toString(); |
| 161593 | if (!exposedVariableSymbolSet.has(idString)) { |
| 161594 | exposedVariableDeclarations.push(decl); |
| 161595 | exposedVariableSymbolSet.set(idString, true); |
| 161596 | } |
| 161597 | } |
| 161598 | else { |
| 161599 | // CONSIDER: this includes binding elements, which we could |
| 161600 | // expose in the same way as variables. |
| 161601 | firstExposedNonVariableDeclaration = firstExposedNonVariableDeclaration || decl; |
| 161602 | } |
| 161603 | } |
| 161604 | } |
| 161605 | ts.forEachChild(node, checkForUsedDeclarations); |
| 161606 | } |
| 161607 | /** |
| 161608 | * Return the symbol referenced by an identifier (even if it declares a different symbol). |
| 161609 | */ |
nothing calls this directly
no test coverage detected
searching dependent graphs…