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

Function getReferencesForNonModule

test/fixtures/snapshot/typescript.js:137422–137440  ·  view source on GitHub ↗
(referencedFile, refFileMap, program)

Source from the content-addressed store, hash-verified

137420 }
137421 Core.getReferencesForFileName = getReferencesForFileName;
137422 function getReferencesForNonModule(referencedFile, refFileMap, program) {
137423 var entries;
137424 var references = refFileMap.get(referencedFile.path) || ts.emptyArray;
137425 for (var _i = 0, references_1 = references; _i < references_1.length; _i++) {
137426 var ref = references_1[_i];
137427 if (ts.isReferencedFile(ref)) {
137428 var referencingFile = program.getSourceFileByPath(ref.file);
137429 var location = ts.getReferencedFileLocation(program.getSourceFileByPath, ref);
137430 if (ts.isReferenceFileLocation(location)) {
137431 entries = ts.append(entries, {
137432 kind: 0 /* EntryKind.Span */,
137433 fileName: referencingFile.fileName,
137434 textSpan: ts.createTextSpanFromRange(location)
137435 });
137436 }
137437 }
137438 }
137439 return entries;
137440 }
137441 function getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker) {
137442 if (node.parent && ts.isNamespaceExportDeclaration(node.parent)) {
137443 var aliasedSymbol = checker.getAliasedSymbol(symbol);

Callers 2

getReferencesForFileNameFunction · 0.85

Calls 2

getMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected