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

Function getModuleSpecifierWorker

test/fixtures/snapshot/typescript.js:122014–122020  ·  view source on GitHub ↗
(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options)

Source from the content-addressed store, hash-verified

122012 }
122013 moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
122014 function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
122015 if (options === void 0) { options = {}; }
122016 var info = getInfo(importingSourceFileName, host);
122017 var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
122018 return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, /*packageNameOnly*/ undefined, options.overrideImportMode); }) ||
122019 getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
122020 }
122021 function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
122022 if (options === void 0) { options = {}; }
122023 return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options)[0];

Callers 2

updateModuleSpecifierFunction · 0.85
getModuleSpecifierFunction · 0.85

Calls 4

getInfoFunction · 0.85
getAllModulePathsFunction · 0.85
getLocalModuleSpecifierFunction · 0.85

Tested by

no test coverage detected