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

Function checkSourceFilesBelongToPath

test/fixtures/snapshot/typescript.js:118616–118630  ·  view source on GitHub ↗
(sourceFiles, rootDirectory)

Source from the content-addressed store, hash-verified

118614 }
118615 }
118616 function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
118617 var allFilesBelongToPath = true;
118618 var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
118619 for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
118620 var sourceFile = sourceFiles_2[_i];
118621 if (!sourceFile.isDeclarationFile) {
118622 var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
118623 if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
118624 addProgramDiagnosticExplainingFile(sourceFile, ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, [sourceFile.fileName, rootDirectory]);
118625 allFilesBelongToPath = false;
118626 }
118627 }
118628 }
118629 return allFilesBelongToPath;
118630 }
118631 function parseProjectReferenceConfigFile(ref) {
118632 if (!projectReferenceRedirects) {
118633 projectReferenceRedirects = new ts.Map();

Callers 1

getCommonSourceDirectoryFunction · 0.85

Calls 2

indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…