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

Function getAllModulePaths

test/fixtures/snapshot/typescript.js:122270–122285  ·  view source on GitHub ↗

* Looks for existing imports that use symlinks to this module. * Symlinks will be returned first so they are preferred over the real path.

(importingFilePath, importedFileName, host, preferences, options)

Source from the content-addressed store, hash-verified

122268 * Symlinks will be returned first so they are preferred over the real path.
122269 */
122270 function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options) {
122271 var _a;
122272 if (options === void 0) { options = {}; }
122273 var importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host));
122274 var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
122275 if (cache) {
122276 var cached = cache.get(importingFilePath, importedFilePath, preferences, options);
122277 if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
122278 return cached.modulePaths;
122279 }
122280 var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
122281 if (cache) {
122282 cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);
122283 }
122284 return modulePaths;
122285 }
122286 function getAllModulePathsWorker(importingFileName, importedFileName, host) {
122287 var getCanonicalFileName = ts.hostGetCanonicalFileName(host);
122288 var allFileNames = new ts.Map();

Callers 2

getModuleSpecifierWorkerFunction · 0.85

Calls 3

getAllModulePathsWorkerFunction · 0.85
getMethod · 0.65
callMethod · 0.45

Tested by

no test coverage detected