Skip to content

Commit

Permalink
Include only files that can be emitted into the source file directory…
Browse files Browse the repository at this point in the history
… check for composite projects

Fixes #31181
  • Loading branch information
sheetalkamat committed May 1, 2019
1 parent 3df65a7 commit a58fdf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
6 changes: 2 additions & 4 deletions src/compiler/program.ts
Expand Up @@ -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));
}
Expand Down

This file was deleted.

0 comments on commit a58fdf2

Please sign in to comment.