diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3657d15800a5b..d7e959ddcbf09 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -909,7 +909,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "strictNullChecks", @@ -919,7 +919,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.When_type_checking_take_into_account_null_and_undefined, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "strictFunctionTypes", @@ -929,7 +929,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "strictBindCallApply", @@ -939,7 +939,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "strictPropertyInitialization", @@ -949,7 +949,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "strictBuiltinIteratorReturn", @@ -959,7 +959,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "noImplicitThis", @@ -969,7 +969,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "useUnknownInCatchVariables", @@ -979,7 +979,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "alwaysStrict", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1a69dba02a6c1..8a79ffdcf9038 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6607,7 +6607,7 @@ "code": 6903 }, - "`false`, unless `strict` is set": { + "`true`, unless `strict` is `false`": { "category": "Message", "code": 6905 }, diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 505fe68ad705b..c27a3f73cd1a9 100644 --- a/tests/baselines/reference/tsc/commandLine/help-all.js +++ b/tests/baselines/reference/tsc/commandLine/help-all.js @@ -234,7 +234,7 @@ default: false --noImplicitAny Enable error reporting for expressions and declarations with an implied 'any' type. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --noImplicitOverride Ensure overriding members in derived classes are marked with an override modifier. @@ -249,7 +249,7 @@ default: false --noImplicitThis Enable error reporting when 'this' is given the type 'any'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --noPropertyAccessFromIndexSignature Enforces using indexed accessors for keys declared using an indexed type. @@ -279,32 +279,32 @@ default: true --strictBindCallApply Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --strictBuiltinIteratorReturn Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --strictFunctionTypes When assigning functions, check to ensure parameters and the return values are subtype-compatible. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --strictNullChecks When type checking, take into account 'null' and 'undefined'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --strictPropertyInitialization Check for class properties that are declared but not set in the constructor. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` --useUnknownInCatchVariables Default catch clause variables as 'unknown' instead of 'any'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is `false` ### Watch and Build Modes