mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 11:46:08 -05:00
Remove defaultValueDescription: "n/a" from options (#46280)
* Remove defaultValueDescription: "n/a" from options * CommandLineOption type <-> defaultValueDescription * Require defaultValueDescription of number/boolean options
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace ts {
|
||||
/* @internal */
|
||||
export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean" };
|
||||
export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
|
||||
|
||||
const jsxOptionMap = new Map(getEntries({
|
||||
"preserve": JsxEmit.Preserve,
|
||||
@@ -140,6 +140,7 @@ namespace ts {
|
||||
type: "boolean",
|
||||
category: Diagnostics.Watch_and_Build_Modes,
|
||||
description: Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "excludeDirectories",
|
||||
@@ -176,11 +177,13 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Print_this_message,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "help",
|
||||
shortName: "?",
|
||||
type: "boolean"
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "watch",
|
||||
@@ -190,6 +193,7 @@ namespace ts {
|
||||
isCommandLineOnly: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Watch_input_files,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "preserveWatchOutput",
|
||||
@@ -197,7 +201,7 @@ namespace ts {
|
||||
showInSimplifiedHelpView: false,
|
||||
category: Diagnostics.Output_Formatting,
|
||||
description: Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
||||
defaultValueDescription: "n/a"
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "listFiles",
|
||||
@@ -210,7 +214,8 @@ namespace ts {
|
||||
name: "explainFiles",
|
||||
type: "boolean",
|
||||
category: Diagnostics.Compiler_Diagnostics,
|
||||
description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included
|
||||
description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "listEmittedFiles",
|
||||
@@ -281,7 +286,8 @@ namespace ts {
|
||||
affectsSemanticDiagnostics: true,
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Watch_and_Build_Modes,
|
||||
description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it
|
||||
description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "locale",
|
||||
@@ -328,6 +334,7 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Show_all_compiler_options,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "version",
|
||||
@@ -336,6 +343,7 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Print_the_compiler_s_version,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "init",
|
||||
@@ -343,6 +351,7 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "project",
|
||||
@@ -360,7 +369,8 @@ namespace ts {
|
||||
shortName: "b",
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date
|
||||
description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "showConfig",
|
||||
@@ -368,7 +378,8 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Command_line_Options,
|
||||
isCommandLineOnly: true,
|
||||
description: Diagnostics.Print_the_final_configuration_instead_of_building
|
||||
description: Diagnostics.Print_the_final_configuration_instead_of_building,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "listFilesOnly",
|
||||
@@ -377,7 +388,8 @@ namespace ts {
|
||||
affectsSemanticDiagnostics: true,
|
||||
affectsEmit: true,
|
||||
isCommandLineOnly: true,
|
||||
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing
|
||||
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
|
||||
// Basic
|
||||
@@ -499,7 +511,6 @@ namespace ts {
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,
|
||||
transpileOptionValue: undefined,
|
||||
defaultValueDescription: "n/a"
|
||||
},
|
||||
{
|
||||
name: "outDir",
|
||||
@@ -510,7 +521,6 @@ namespace ts {
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Specify_an_output_folder_for_all_emitted_files,
|
||||
defaultValueDescription: "n/a"
|
||||
},
|
||||
{
|
||||
name: "rootDir",
|
||||
@@ -668,6 +678,7 @@ namespace ts {
|
||||
strictFlag: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "alwaysStrict",
|
||||
@@ -701,7 +712,8 @@ namespace ts {
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined
|
||||
description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "noImplicitReturns",
|
||||
@@ -717,21 +729,24 @@ namespace ts {
|
||||
affectsBindDiagnostics: true,
|
||||
affectsSemanticDiagnostics: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements
|
||||
description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "noUncheckedIndexedAccess",
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Include_undefined_in_index_signature_results
|
||||
description: Diagnostics.Include_undefined_in_index_signature_results,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "noImplicitOverride",
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier
|
||||
description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "noPropertyAccessFromIndexSignature",
|
||||
@@ -841,7 +856,7 @@ namespace ts {
|
||||
type: "boolean",
|
||||
category: Diagnostics.Interop_Constraints,
|
||||
description: Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
||||
defaultValueDescription: "n/a"
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "allowUmdGlobalAccess",
|
||||
@@ -892,7 +907,8 @@ namespace ts {
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
category: Diagnostics.Language_and_Environment,
|
||||
description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators
|
||||
description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "emitDecoratorMetadata",
|
||||
@@ -900,7 +916,8 @@ namespace ts {
|
||||
affectsSemanticDiagnostics: true,
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Language_and_Environment,
|
||||
description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files
|
||||
description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
|
||||
// Advanced
|
||||
@@ -945,7 +962,6 @@ namespace ts {
|
||||
category: Diagnostics.Backwards_Compatibility,
|
||||
paramType: Diagnostics.FILE,
|
||||
transpileOptionValue: undefined,
|
||||
defaultValueDescription: "n/a",
|
||||
description: Diagnostics.Deprecated_setting_Use_outFile_instead,
|
||||
},
|
||||
{
|
||||
@@ -1026,6 +1042,7 @@ namespace ts {
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "disableSizeLimit",
|
||||
@@ -1040,21 +1057,24 @@ namespace ts {
|
||||
type: "boolean",
|
||||
isTSConfigOnly: true,
|
||||
category: Diagnostics.Projects,
|
||||
description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects
|
||||
description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "disableSolutionSearching",
|
||||
type: "boolean",
|
||||
isTSConfigOnly: true,
|
||||
category: Diagnostics.Projects,
|
||||
description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing
|
||||
description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "disableReferencedProjectLoad",
|
||||
type: "boolean",
|
||||
isTSConfigOnly: true,
|
||||
category: Diagnostics.Projects,
|
||||
description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript
|
||||
description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "noImplicitUseStrict",
|
||||
@@ -1087,7 +1107,7 @@ namespace ts {
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
||||
defaultValueDescription: "n/a"
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "declarationDir",
|
||||
@@ -1098,7 +1118,6 @@ namespace ts {
|
||||
category: Diagnostics.Emit,
|
||||
transpileOptionValue: undefined,
|
||||
description: Diagnostics.Specify_the_output_directory_for_generated_declaration_files,
|
||||
defaultValueDescription: "n/a"
|
||||
},
|
||||
{
|
||||
name: "skipLibCheck",
|
||||
@@ -1180,6 +1199,7 @@ namespace ts {
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
|
||||
{
|
||||
@@ -1242,27 +1262,31 @@ namespace ts {
|
||||
shortName: "v",
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Enable_verbose_logging,
|
||||
type: "boolean"
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "dry",
|
||||
shortName: "d",
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
||||
type: "boolean"
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "force",
|
||||
shortName: "f",
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
||||
type: "boolean"
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "clean",
|
||||
category: Diagnostics.Command_line_Options,
|
||||
description: Diagnostics.Delete_the_outputs_of_all_projects,
|
||||
type: "boolean"
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1280,10 +1304,12 @@ namespace ts {
|
||||
*/
|
||||
name: "enableAutoDiscovery",
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "enable",
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
{
|
||||
name: "include",
|
||||
@@ -1304,6 +1330,7 @@ namespace ts {
|
||||
{
|
||||
name: "disableFilenameBasedTypeAcquisition",
|
||||
type: "boolean",
|
||||
defaultValueDescription: "false",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -2285,7 +2312,7 @@ namespace ts {
|
||||
return getCustomTypeMapOfCommandLineOption(optionDefinition.element);
|
||||
}
|
||||
else {
|
||||
return (optionDefinition as CommandLineOptionOfCustomType).type;
|
||||
return optionDefinition.type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user