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

Function tryFindNonRelativeModuleNameInCache

test/fixtures/snapshot/typescript.js:44456–44465  ·  view source on GitHub ↗
(cache, moduleName, containingDirectory, state)

Source from the content-addressed store, hash-verified

44454 }
44455 ts.unmangleScopedPackageName = unmangleScopedPackageName;
44456 function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, state) {
44457 var result = cache && cache.get(containingDirectory);
44458 if (result) {
44459 if (state.traceEnabled) {
44460 trace(state.host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
44461 }
44462 state.resultFromCache = result;
44463 return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, originalPath: result.resolvedModule.originalPath || true, extension: result.resolvedModule.extension, packageId: result.resolvedModule.packageId } };
44464 }
44465 }
44466 function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
44467 var traceEnabled = isTraceEnabled(compilerOptions, host);
44468 var failedLookupLocations = [];

Callers 2

tryResolveFunction · 0.85

Calls 2

traceFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…