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

Function createImportTracker

test/fixtures/snapshot/typescript.js:136202–136208  ·  view source on GitHub ↗

Creates the imports map and returns an ImportTracker that uses it. Call this lazily to avoid calling `getDirectImportsMap` unnecessarily.

(sourceFiles, sourceFilesSet, checker, cancellationToken)

Source from the content-addressed store, hash-verified

136200 (function (FindAllReferences) {
136201 /** Creates the imports map and returns an ImportTracker that uses it. Call this lazily to avoid calling `getDirectImportsMap` unnecessarily. */
136202 function createImportTracker(sourceFiles, sourceFilesSet, checker, cancellationToken) {
136203 var allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);
136204 return function (exportSymbol, exportInfo, isForRename) {
136205 var _a = getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, exportInfo, checker, cancellationToken), directImports = _a.directImports, indirectUsers = _a.indirectUsers;
136206 return __assign({ indirectUsers: indirectUsers }, getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename));
136207 };
136208 }
136209 FindAllReferences.createImportTracker = createImportTracker;
136210 var ExportKind;
136211 (function (ExportKind) {

Callers

nothing calls this directly

Calls 3

getDirectImportsMapFunction · 0.85
getImportersForExportFunction · 0.85

Tested by

no test coverage detected