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

Function processResolution

test/fixtures/snapshot/typescript.js:20440–20449  ·  view source on GitHub ↗
(cache, resolution)

Source from the content-addressed store, hash-verified

20438 hasProcessedResolutions: function () { return hasProcessedResolutions; },
20439 };
20440 function processResolution(cache, resolution) {
20441 if (!resolution || !resolution.originalPath || !resolution.resolvedFileName)
20442 return;
20443 var resolvedFileName = resolution.resolvedFileName, originalPath = resolution.originalPath;
20444 cache.setSymlinkedFile(ts.toPath(originalPath, cwd, getCanonicalFileName), resolvedFileName);
20445 var _a = guessDirectorySymlink(resolvedFileName, originalPath, cwd, getCanonicalFileName) || ts.emptyArray, commonResolved = _a[0], commonOriginal = _a[1];
20446 if (commonResolved && commonOriginal) {
20447 cache.setSymlinkedDirectory(commonOriginal, { real: commonResolved, realPath: ts.toPath(commonResolved, cwd, getCanonicalFileName) });
20448 }
20449 }
20450 }
20451 ts.createSymlinkCache = createSymlinkCache;
20452 function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) {

Callers 1

createSymlinkCacheFunction · 0.85

Calls 1

guessDirectorySymlinkFunction · 0.85

Tested by

no test coverage detected