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

Function tryGetModuleSpecifiersFromCacheWorker

test/fixtures/snapshot/typescript.js:122026–122036  ·  view source on GitHub ↗
(moduleSymbol, importingSourceFile, host, userPreferences, options)

Source from the content-addressed store, hash-verified

122024 }
122025 moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
122026 function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options) {
122027 var _a;
122028 if (options === void 0) { options = {}; }
122029 var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
122030 if (!moduleSourceFile) {
122031 return ts.emptyArray;
122032 }
122033 var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
122034 var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);
122035 return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
122036 }
122037 /** Returns an import for each symlink and for the realpath. */
122038 function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
122039 if (options === void 0) { options = {}; }

Calls 2

getMethod · 0.65
callMethod · 0.45

Tested by

no test coverage detected