mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 11:46:08 -05:00
Add flag to change catch variables' default types to unknown (#41013)
* Add test case for 'useUnknownInCatchVariables'. * Add new 'useUnknownInCatchVariables' flag. * Accepted baselines. * Add test for catch variable explicitly typed as 'any'. * Accepted baselines. * Move option under 'strict'. * Accepted baselines. * 'useUnknownInCatchVariables' is strict in command line help.
This commit is contained in:
committed by
GitHub
parent
6baa1bec64
commit
9906092db2
@@ -632,6 +632,15 @@ namespace ts {
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
|
||||
},
|
||||
{
|
||||
name: "useUnknownInCatchVariables",
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
strictFlag: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Type_Checking,
|
||||
description: Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
||||
},
|
||||
{
|
||||
name: "alwaysStrict",
|
||||
type: "boolean",
|
||||
|
||||
Reference in New Issue
Block a user