From 62fbfa80a578a5d4be4dfb9b5ec68833ef9d6e04 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 20:42:25 +0000 Subject: [PATCH 1/6] Update diagnostic message for strict-dependent options. --- src/compiler/diagnosticMessages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1a69dba02a6c1..9ba7c91af1d7a 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 disabled": { "category": "Message", "code": 6905 }, From 0d988f05bbc33abaf0ebfb79291d863051848020 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 20:42:33 +0000 Subject: [PATCH 2/6] Use new diagnostic. --- src/compiler/commandLineParser.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3657d15800a5b..8463b1db074bf 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { 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_disabled, }, { name: "alwaysStrict", From 984557c097e8cdb883cbfe6f24d2570574b39945 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 20:46:21 +0000 Subject: [PATCH 3/6] Accept baselines. --- .../reference/tsc/commandLine/help-all.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 505fe68ad705b..0a83ecbe46685 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 disabled --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 disabled --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 disabled --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 disabled --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 disabled --strictNullChecks When type checking, take into account 'null' and 'undefined'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is disabled --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 disabled --useUnknownInCatchVariables Default catch clause variables as 'unknown' instead of 'any'. type: boolean -default: `false`, unless `strict` is set +default: `true`, unless `strict` is disabled ### Watch and Build Modes From 36e80afe66d20966815d775d961ee59053c709e7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 23:21:35 +0000 Subject: [PATCH 4/6] Code review feedback. --- src/compiler/diagnosticMessages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 9ba7c91af1d7a..8a79ffdcf9038 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6607,7 +6607,7 @@ "code": 6903 }, - "`true`, unless `strict` is disabled": { + "`true`, unless `strict` is `false`": { "category": "Message", "code": 6905 }, From 8004b1cb52a61fd7ffbde04ae80d14241859ba2d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 23:21:43 +0000 Subject: [PATCH 5/6] Update usages. --- src/compiler/commandLineParser.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8463b1db074bf..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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + 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.true_unless_strict_is_disabled, + defaultValueDescription: Diagnostics.true_unless_strict_is_false, }, { name: "alwaysStrict", From 99aad01fda20fd963e3822f4129d8b6193938a34 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 4 Feb 2026 23:21:50 +0000 Subject: [PATCH 6/6] Accept baselines. --- .../reference/tsc/commandLine/help-all.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 0a83ecbe46685..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: `true`, unless `strict` is disabled +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: `true`, unless `strict` is disabled +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: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` --strictBuiltinIteratorReturn Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. type: boolean -default: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` --strictFunctionTypes When assigning functions, check to ensure parameters and the return values are subtype-compatible. type: boolean -default: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` --strictNullChecks When type checking, take into account 'null' and 'undefined'. type: boolean -default: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` --strictPropertyInitialization Check for class properties that are declared but not set in the constructor. type: boolean -default: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` --useUnknownInCatchVariables Default catch clause variables as 'unknown' instead of 'any'. type: boolean -default: `true`, unless `strict` is disabled +default: `true`, unless `strict` is `false` ### Watch and Build Modes