(program, cancellationToken, sourceFiles, node, position)
| 137026 | } |
| 137027 | FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition; |
| 137028 | function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { |
| 137029 | if (node.kind === 305 /* SyntaxKind.SourceFile */) { |
| 137030 | return undefined; |
| 137031 | } |
| 137032 | var checker = program.getTypeChecker(); |
| 137033 | // If invoked directly on a shorthand property assignment, then return |
| 137034 | // the declaration of the symbol being assigned (not the symbol being assigned to). |
| 137035 | if (node.parent.kind === 297 /* SyntaxKind.ShorthandPropertyAssignment */) { |
| 137036 | var result_2 = []; |
| 137037 | Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, function (node) { return result_2.push(nodeEntry(node)); }); |
| 137038 | return result_2; |
| 137039 | } |
| 137040 | else if (node.kind === 106 /* SyntaxKind.SuperKeyword */ || ts.isSuperProperty(node.parent)) { |
| 137041 | // References to and accesses on the super keyword only have one possible implementation, so no |
| 137042 | // need to "Find all References" |
| 137043 | var symbol = checker.getSymbolAtLocation(node); |
| 137044 | return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; |
| 137045 | } |
| 137046 | else { |
| 137047 | // Perform "Find all References" and retrieve only those that are implementations |
| 137048 | return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* FindReferencesUse.References */ }); |
| 137049 | } |
| 137050 | } |
| 137051 | function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { |
| 137052 | return ts.map(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options)), function (entry) { return convertEntry(entry, node, program.getTypeChecker()); }); |
| 137053 | } |
no test coverage detected