Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/compiler/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,10 @@ func (p *Program) verifyCompilerOptions() {
}
}

if options.TsBuildInfoFile == "" && options.Incremental.IsTrue() && options.ConfigFilePath == "" {
createCompilerOptionsDiagnostic(diagnostics.Option_incremental_is_only_valid_with_a_known_configuration_file_like_tsconfig_json_or_when_tsBuildInfoFile_is_explicitly_provided)
}

p.verifyProjectReferences()

if options.Composite.IsTrue() {
Expand Down
6 changes: 3 additions & 3 deletions internal/diagnostics/diagnostics_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions internal/diagnostics/extraDiagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@
"tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.": {
"category": "Error",
"code": 5112
},
"Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.": {
"category": "Error",
"code": 5074
}
}
Binary file modified internal/diagnostics/loc/cs-CZ.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/de-DE.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/es-ES.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/fr-FR.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/it-IT.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/ja-JP.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/ko-KR.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/pl-PL.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/pt-BR.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/ru-RU.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/tr-TR.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/zh-CN.json.gz
Binary file not shown.
Binary file modified internal/diagnostics/loc/zh-TW.json.gz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error TS5074: Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.


!!! error TS5074: Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.
==== incrementalInvalid.ts (0 errors) ====
const x = 10;


Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
-
-
-!!! error TS5074: Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.
-==== incrementalInvalid.ts (0 errors) ====
- const x = 10;
-
-
+<no content>
+error TS5074: Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.
+
+
+!!! error TS5074: Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.
==== incrementalInvalid.ts (0 errors) ====
const x = 10;