Revert "Disallow incremental with noEmit"

This commit is contained in:
Sheetal Nandi 2019-10-08 13:41:40 -07:00 committed by GitHub
parent f1c0300c02
commit 8032984de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 82 deletions

View File

@ -2929,10 +2929,6 @@ namespace ts {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
}
if (options.noEmit && isIncrementalCompilation(options)) {
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite");
}
verifyProjectReferences();
// List of collected files is complete; validate exhautiveness if this is a project with a file list

View File

@ -1,19 +0,0 @@
/tsconfig.json(3,9): error TS5053: Option 'noEmit' cannot be specified with option 'composite'.
/tsconfig.json(4,9): error TS5053: Option 'noEmit' cannot be specified with option 'composite'.
==== /tsconfig.json (2 errors) ====
{
"compilerOptions": {
"noEmit": true,
~~~~~~~~
!!! error TS5053: Option 'noEmit' cannot be specified with option 'composite'.
"composite": true
~~~~~~~~~~~
!!! error TS5053: Option 'noEmit' cannot be specified with option 'composite'.
}
}
==== /a.ts (0 errors) ====
const x = 10;

View File

@ -1,4 +0,0 @@
=== /a.ts ===
const x = 10;
>x : Symbol(x, Decl(a.ts, 0, 5))

View File

@ -1,5 +0,0 @@
=== /a.ts ===
const x = 10;
>x : 10
>10 : 10

View File

@ -1,20 +0,0 @@
/tsconfig.json(3,9): error TS5053: Option 'noEmit' cannot be specified with option 'incremental'.
/tsconfig.json(4,9): error TS5053: Option 'noEmit' cannot be specified with option 'incremental'.
==== /tsconfig.json (2 errors) ====
{
"compilerOptions": {
"noEmit": true,
~~~~~~~~
!!! error TS5053: Option 'noEmit' cannot be specified with option 'incremental'.
"incremental": true
~~~~~~~~~~~~~
!!! error TS5053: Option 'noEmit' cannot be specified with option 'incremental'.
}
}
==== /a.ts (0 errors) ====
const x = 10;

View File

@ -1,4 +0,0 @@
=== /a.ts ===
const x = 10;
>x : Symbol(x, Decl(a.ts, 0, 5))

View File

@ -1,5 +0,0 @@
=== /a.ts ===
const x = 10;
>x : 10
>10 : 10

View File

@ -1,10 +0,0 @@
// @Filename: /a.ts
const x = 10;
// @Filename: /tsconfig.json
{
"compilerOptions": {
"noEmit": true,
"composite": true
}
}

View File

@ -1,11 +0,0 @@
// @Filename: /a.ts
const x = 10;
// @Filename: /tsconfig.json
{
"compilerOptions": {
"noEmit": true,
"incremental": true
}
}