* Return the symbol referenced by an identifier (even if it declares a different symbol).
(identifier)
| 161608 | * Return the symbol referenced by an identifier (even if it declares a different symbol). |
| 161609 | */ |
| 161610 | function getSymbolReferencedByIdentifier(identifier) { |
| 161611 | // If the identifier is both a property name and its value, we're only interested in its value |
| 161612 | // (since the name is a declaration and will be included in the extracted range). |
| 161613 | return identifier.parent && ts.isShorthandPropertyAssignment(identifier.parent) && identifier.parent.name === identifier |
| 161614 | ? checker.getShorthandAssignmentValueSymbol(identifier.parent) |
| 161615 | : checker.getSymbolAtLocation(identifier); |
| 161616 | } |
| 161617 | function tryReplaceWithQualifiedNameOrPropertyAccess(symbol, scopeDecl, isTypeNode) { |
| 161618 | if (!symbol) { |
| 161619 | return undefined; |
no outgoing calls
no test coverage detected