mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Include only files that can be emitted into the source file directory check for composite projects
Fixes #31181
This commit is contained in:
@@ -2768,10 +2768,8 @@ namespace ts {
|
||||
if (options.composite) {
|
||||
const rootPaths = rootNames.map(toPath);
|
||||
for (const file of files) {
|
||||
// Ignore declaration files
|
||||
if (file.isDeclarationFile) continue;
|
||||
// Ignore json file thats from project reference
|
||||
if (isJsonSourceFile(file) && getResolvedProjectReferenceToRedirect(file.fileName)) continue;
|
||||
// Ignore file that is not emitted
|
||||
if (!sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary, getResolvedProjectReferenceToRedirect)) continue;
|
||||
if (rootPaths.indexOf(file.path) === -1) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern, file.fileName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user