Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8eee8db

Browse filesBrowse files
authored
NoEmit and incremental are allowed with listFilesOnly (microsoft#36488)
Fixes microsoft#32882
1 parent e87b2e3 commit 8eee8db
Copy full SHA for 8eee8db
Expand file treeCollapse file tree

7 files changed

+44
-1
lines changed

‎src/compiler/program.ts

Copy file name to clipboardExpand all lines: src/compiler/program.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2987,7 +2987,7 @@ namespace ts {
29872987
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
29882988
}
29892989

2990-
if (options.noEmit && isIncrementalCompilation(options)) {
2990+
if (!options.listFilesOnly && options.noEmit && isIncrementalCompilation(options)) {
29912991
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite");
29922992
}
29932993

+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
=== /a.ts ===
2+
const x = 10;
3+
>x : Symbol(x, Decl(a.ts, 0, 5))
4+
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== /a.ts ===
2+
const x = 10;
3+
>x : 10
4+
>10 : 10
5+
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
=== /a.ts ===
2+
const x = 10;
3+
>x : Symbol(x, Decl(a.ts, 0, 5))
4+
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== /a.ts ===
2+
const x = 10;
3+
>x : 10
4+
>10 : 10
5+
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @listFilesOnly: true
2+
3+
// @Filename: /a.ts
4+
const x = 10;
5+
6+
// @Filename: /tsconfig.json
7+
{
8+
"compilerOptions": {
9+
"noEmit": true,
10+
"composite": true
11+
}
12+
}
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// @listFilesOnly: true
2+
3+
// @Filename: /a.ts
4+
const x = 10;
5+
6+
// @Filename: /tsconfig.json
7+
{
8+
"compilerOptions": {
9+
"noEmit": true,
10+
"incremental": true
11+
}
12+
}
13+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.