Skip to content

Commit 66decdf

Browse files
Update descriptions for strict-related flags (#63095)
1 parent a88d4c1 commit 66decdf

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/compiler/commandLineParser.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
909909
strictFlag: true,
910910
category: Diagnostics.Type_Checking,
911911
description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
912-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
912+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
913913
},
914914
{
915915
name: "strictNullChecks",
@@ -919,7 +919,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
919919
strictFlag: true,
920920
category: Diagnostics.Type_Checking,
921921
description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
922-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
922+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
923923
},
924924
{
925925
name: "strictFunctionTypes",
@@ -929,7 +929,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
929929
strictFlag: true,
930930
category: Diagnostics.Type_Checking,
931931
description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
932-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
932+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
933933
},
934934
{
935935
name: "strictBindCallApply",
@@ -939,7 +939,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
939939
strictFlag: true,
940940
category: Diagnostics.Type_Checking,
941941
description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
942-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
942+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
943943
},
944944
{
945945
name: "strictPropertyInitialization",
@@ -949,7 +949,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
949949
strictFlag: true,
950950
category: Diagnostics.Type_Checking,
951951
description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
952-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
952+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
953953
},
954954
{
955955
name: "strictBuiltinIteratorReturn",
@@ -959,7 +959,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
959959
strictFlag: true,
960960
category: Diagnostics.Type_Checking,
961961
description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
962-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
962+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
963963
},
964964
{
965965
name: "noImplicitThis",
@@ -969,7 +969,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
969969
strictFlag: true,
970970
category: Diagnostics.Type_Checking,
971971
description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
972-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
972+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
973973
},
974974
{
975975
name: "useUnknownInCatchVariables",
@@ -979,7 +979,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
979979
strictFlag: true,
980980
category: Diagnostics.Type_Checking,
981981
description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
982-
defaultValueDescription: Diagnostics.false_unless_strict_is_set,
982+
defaultValueDescription: Diagnostics.true_unless_strict_is_false,
983983
},
984984
{
985985
name: "alwaysStrict",

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6607,7 +6607,7 @@
66076607
"code": 6903
66086608
},
66096609

6610-
"`false`, unless `strict` is set": {
6610+
"`true`, unless `strict` is `false`": {
66116611
"category": "Message",
66126612
"code": 6905
66136613
},

tests/baselines/reference/tsc/commandLine/help-all.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ default: false
234234
--noImplicitAny
235235
Enable error reporting for expressions and declarations with an implied 'any' type.
236236
type: boolean
237-
default: `false`, unless `strict` is set
237+
default: `true`, unless `strict` is `false`
238238

239239
--noImplicitOverride
240240
Ensure overriding members in derived classes are marked with an override modifier.
@@ -249,7 +249,7 @@ default: false
249249
--noImplicitThis
250250
Enable error reporting when 'this' is given the type 'any'.
251251
type: boolean
252-
default: `false`, unless `strict` is set
252+
default: `true`, unless `strict` is `false`
253253

254254
--noPropertyAccessFromIndexSignature
255255
Enforces using indexed accessors for keys declared using an indexed type.
@@ -279,32 +279,32 @@ default: true
279279
--strictBindCallApply
280280
Check that the arguments for 'bind', 'call', and 'apply' methods match the original function.
281281
type: boolean
282-
default: `false`, unless `strict` is set
282+
default: `true`, unless `strict` is `false`
283283

284284
--strictBuiltinIteratorReturn
285285
Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'.
286286
type: boolean
287-
default: `false`, unless `strict` is set
287+
default: `true`, unless `strict` is `false`
288288

289289
--strictFunctionTypes
290290
When assigning functions, check to ensure parameters and the return values are subtype-compatible.
291291
type: boolean
292-
default: `false`, unless `strict` is set
292+
default: `true`, unless `strict` is `false`
293293

294294
--strictNullChecks
295295
When type checking, take into account 'null' and 'undefined'.
296296
type: boolean
297-
default: `false`, unless `strict` is set
297+
default: `true`, unless `strict` is `false`
298298

299299
--strictPropertyInitialization
300300
Check for class properties that are declared but not set in the constructor.
301301
type: boolean
302-
default: `false`, unless `strict` is set
302+
default: `true`, unless `strict` is `false`
303303

304304
--useUnknownInCatchVariables
305305
Default catch clause variables as 'unknown' instead of 'any'.
306306
type: boolean
307-
default: `false`, unless `strict` is set
307+
default: `true`, unless `strict` is `false`
308308

309309
### Watch and Build Modes
310310

0 commit comments

Comments
 (0)