mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Make sure to emit again if change in compiler option affects emit
Fixes #30736
This commit is contained in:
@@ -281,6 +281,7 @@ namespace ts {
|
||||
name: "declaration",
|
||||
shortName: "d",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Generates_corresponding_d_ts_file,
|
||||
@@ -288,6 +289,7 @@ namespace ts {
|
||||
{
|
||||
name: "declarationMap",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,
|
||||
@@ -295,12 +297,14 @@ namespace ts {
|
||||
{
|
||||
name: "emitDeclarationOnly",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Only_emit_d_ts_declaration_files,
|
||||
},
|
||||
{
|
||||
name: "sourceMap",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Generates_corresponding_map_file,
|
||||
@@ -308,6 +312,7 @@ namespace ts {
|
||||
{
|
||||
name: "outFile",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: true,
|
||||
paramType: Diagnostics.FILE,
|
||||
showInSimplifiedHelpView: true,
|
||||
@@ -317,6 +322,7 @@ namespace ts {
|
||||
{
|
||||
name: "outDir",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: true,
|
||||
paramType: Diagnostics.DIRECTORY,
|
||||
showInSimplifiedHelpView: true,
|
||||
@@ -326,6 +332,7 @@ namespace ts {
|
||||
{
|
||||
name: "rootDir",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: true,
|
||||
paramType: Diagnostics.LOCATION,
|
||||
category: Diagnostics.Basic_Options,
|
||||
@@ -334,6 +341,7 @@ namespace ts {
|
||||
{
|
||||
name: "composite",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
isTSConfigOnly: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Enable_project_compilation,
|
||||
@@ -341,6 +349,7 @@ namespace ts {
|
||||
{
|
||||
name: "tsBuildInfoFile",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: true,
|
||||
paramType: Diagnostics.FILE,
|
||||
category: Diagnostics.Basic_Options,
|
||||
@@ -349,6 +358,7 @@ namespace ts {
|
||||
{
|
||||
name: "removeComments",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Do_not_emit_comments_to_output,
|
||||
@@ -356,6 +366,7 @@ namespace ts {
|
||||
{
|
||||
name: "noEmit",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Do_not_emit_outputs,
|
||||
@@ -363,12 +374,14 @@ namespace ts {
|
||||
{
|
||||
name: "importHelpers",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Import_emit_helpers_from_tslib
|
||||
},
|
||||
{
|
||||
name: "downlevelIteration",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Basic_Options,
|
||||
description: Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
|
||||
},
|
||||
@@ -580,6 +593,7 @@ namespace ts {
|
||||
{
|
||||
name: "sourceRoot",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
paramType: Diagnostics.LOCATION,
|
||||
category: Diagnostics.Source_Map_Options,
|
||||
description: Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
|
||||
@@ -587,6 +601,7 @@ namespace ts {
|
||||
{
|
||||
name: "mapRoot",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
paramType: Diagnostics.LOCATION,
|
||||
category: Diagnostics.Source_Map_Options,
|
||||
description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
||||
@@ -594,12 +609,14 @@ namespace ts {
|
||||
{
|
||||
name: "inlineSourceMap",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Source_Map_Options,
|
||||
description: Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
|
||||
},
|
||||
{
|
||||
name: "inlineSources",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Source_Map_Options,
|
||||
description: Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
|
||||
},
|
||||
@@ -635,6 +652,7 @@ namespace ts {
|
||||
{
|
||||
name: "out",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: false, // This is intentionally broken to support compatability with existing tsconfig files
|
||||
// for correct behaviour, please use outFile
|
||||
category: Diagnostics.Advanced_Options,
|
||||
@@ -644,6 +662,7 @@ namespace ts {
|
||||
{
|
||||
name: "reactNamespace",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
|
||||
},
|
||||
@@ -662,6 +681,7 @@ namespace ts {
|
||||
{
|
||||
name: "emitBOM",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
|
||||
},
|
||||
@@ -677,6 +697,7 @@ namespace ts {
|
||||
crlf: NewLineKind.CarriageReturnLineFeed,
|
||||
lf: NewLineKind.LineFeed
|
||||
}),
|
||||
affectsEmit: true,
|
||||
paramType: Diagnostics.NEWLINE,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
|
||||
@@ -704,6 +725,7 @@ namespace ts {
|
||||
{
|
||||
name: "stripInternal",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
|
||||
},
|
||||
@@ -724,24 +746,28 @@ namespace ts {
|
||||
{
|
||||
name: "noEmitHelpers",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
|
||||
},
|
||||
{
|
||||
name: "noEmitOnError",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
|
||||
},
|
||||
{
|
||||
name: "preserveConstEnums",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
|
||||
},
|
||||
{
|
||||
name: "declarationDir",
|
||||
type: "string",
|
||||
affectsEmit: true,
|
||||
isFilePath: true,
|
||||
paramType: Diagnostics.DIRECTORY,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
@@ -826,6 +852,10 @@ namespace ts {
|
||||
export const semanticDiagnosticsOptionDeclarations: ReadonlyArray<CommandLineOption> =
|
||||
optionDeclarations.filter(option => !!option.affectsSemanticDiagnostics);
|
||||
|
||||
/* @internal */
|
||||
export const affectsEmitOptionDeclarations: ReadonlyArray<CommandLineOption> =
|
||||
optionDeclarations.filter(option => !!option.affectsEmit);
|
||||
|
||||
/* @internal */
|
||||
export const moduleResolutionOptionDeclarations: ReadonlyArray<CommandLineOption> =
|
||||
optionDeclarations.filter(option => !!option.affectsModuleResolution);
|
||||
|
||||
Reference in New Issue
Block a user