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

Function getReferencesForFileName

test/fixtures/snapshot/typescript.js:137410–137420  ·  view source on GitHub ↗
(fileName, program, sourceFiles, sourceFilesSet)

Source from the content-addressed store, hash-verified

137408 }
137409 Core.getAdjustedNode = getAdjustedNode;
137410 function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet) {
137411 var _a, _b;
137412 if (sourceFilesSet === void 0) { sourceFilesSet = new ts.Set(sourceFiles.map(function (f) { return f.fileName; })); }
137413 var moduleSymbol = (_a = program.getSourceFile(fileName)) === null || _a === void 0 ? void 0 : _a.symbol;
137414 if (moduleSymbol) {
137415 return ((_b = getReferencedSymbolsForModule(program, moduleSymbol, /*excludeImportTypeOfExportEquals*/ false, sourceFiles, sourceFilesSet)[0]) === null || _b === void 0 ? void 0 : _b.references) || ts.emptyArray;
137416 }
137417 var fileIncludeReasons = program.getFileIncludeReasons();
137418 var referencedFile = program.getSourceFile(fileName);
137419 return referencedFile && fileIncludeReasons && getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || ts.emptyArray;
137420 }
137421 Core.getReferencesForFileName = getReferencesForFileName;
137422 function getReferencesForNonModule(referencedFile, refFileMap, program) {
137423 var entries;

Callers

nothing calls this directly

Calls 3

mapMethod · 0.65

Tested by

no test coverage detected