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

Function getSourceFilePathInNewDirWorker

test/fixtures/snapshot/typescript.js:18500–18505  ·  view source on GitHub ↗
(fileName, newDirPath, currentDirectory, commonSourceDirectory, getCanonicalFileName)

Source from the content-addressed store, hash-verified

18498 }
18499 ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir;
18500 function getSourceFilePathInNewDirWorker(fileName, newDirPath, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
18501 var sourceFilePath = ts.getNormalizedAbsolutePath(fileName, currentDirectory);
18502 var isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0;
18503 sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath;
18504 return ts.combinePaths(newDirPath, sourceFilePath);
18505 }
18506 ts.getSourceFilePathInNewDirWorker = getSourceFilePathInNewDirWorker;
18507 function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
18508 host.writeFile(fileName, text, writeByteOrderMark, function (hostErrorMessage) {

Calls 2

getCanonicalFileNameFunction · 0.85
indexOfMethod · 0.45

Tested by

no test coverage detected