MCPcopy Index your code
hub / github.com/nodejs/node / getImplementationsAtPosition

Function getImplementationsAtPosition

test/fixtures/snapshot/typescript.js:136999–137026  ·  view source on GitHub ↗
(program, cancellationToken, sourceFiles, sourceFile, position)

Source from the content-addressed store, hash-verified

136997 || (node.kind === 134 /* SyntaxKind.ConstructorKeyword */ && ts.isConstructorDeclaration(node.parent));
136998 }
136999 function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {
137000 var node = ts.getTouchingPropertyName(sourceFile, position);
137001 var referenceEntries;
137002 var entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position);
137003 if (node.parent.kind === 206 /* SyntaxKind.PropertyAccessExpression */
137004 || node.parent.kind === 203 /* SyntaxKind.BindingElement */
137005 || node.parent.kind === 207 /* SyntaxKind.ElementAccessExpression */
137006 || node.kind === 106 /* SyntaxKind.SuperKeyword */) {
137007 referenceEntries = entries && __spreadArray([], entries, true);
137008 }
137009 else {
137010 var queue = entries && __spreadArray([], entries, true);
137011 var seenNodes = new ts.Map();
137012 while (queue && queue.length) {
137013 var entry = queue.shift();
137014 if (!ts.addToSeen(seenNodes, ts.getNodeId(entry.node))) {
137015 continue;
137016 }
137017 referenceEntries = ts.append(referenceEntries, entry);
137018 var entries_1 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);
137019 if (entries_1) {
137020 queue.push.apply(queue, entries_1);
137021 }
137022 }
137023 }
137024 var checker = program.getTypeChecker();
137025 return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
137026 }
137027 FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
137028 function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) {
137029 if (node.kind === 305 /* SyntaxKind.SourceFile */) {

Callers

nothing calls this directly

Calls 6

toImplementationLocationFunction · 0.85
mapMethod · 0.65
shiftMethod · 0.45
appendMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected