Skip to content
Merged
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: 0 additions & 4 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4649,10 +4649,6 @@
"category": "Error",
"code": 5110
},
"Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.": {
"category": "Error",
"code": 5111
},

"Generates a sourcemap for each corresponding '.d.ts' file.": {
"category": "Message",
Expand Down
3 changes: 1 addition & 2 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,7 @@ export function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): stri
return buildInfoExtensionLess + Extension.TsBuildInfo;
}

/** @internal */
export function canEmitTsBuildInfo(options: CompilerOptions): boolean {
function canEmitTsBuildInfo(options: CompilerOptions) {
return isIncrementalCompilation(options) || !!options.tscBuild;
}

Expand Down
8 changes: 1 addition & 7 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
AsExpression,
BuilderProgram,
CancellationToken,
canEmitTsBuildInfo,
canHaveDecorators,
canHaveIllegalDecorators,
chainDiagnosticMessages,
Expand Down Expand Up @@ -4324,12 +4323,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
}

const outputFile = options.outFile;
if (options.tsBuildInfoFile) {
if (!canEmitTsBuildInfo(options)) {
createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
}
}
else if (options.incremental && !outputFile && !options.configFilePath) {
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ declare const console: { log(msg: any): void; };

/home/src/tslibs/TS/Lib/tsc.js --composite false
Output::
tsconfig.json:6:5 - error TS5111: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.

6 "tsBuildInfoFile": "tsconfig.json.tsbuildinfo"
   ~~~~~~~~~~~~~~~~~


Found 1 error in tsconfig.json:6



//// [/home/src/workspaces/project/src/main.js]
Expand All @@ -52,4 +44,4 @@ exports.x = 10;



exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
exitCode:: ExitStatus.Success