TypeScript: variables in catch
should be unknown
on default settings
#13531
Labels
duplicate
a duplicate of another issue
With the following code:
The Deno language server shows the type of the
error
variable asany
, which should beunknown
and a compiler error. Below is a screenshot of the Deno language server running in Visual Studio Code.Version information:
Since TypeScript v4.4, useUnknownInCatchVariables is activated when
strict
istrue
. According to the documentation on deno.land, the default value ofstrict
istrue
in Deno's default tsconfig, souseUnknownInCatchVariables
would be implicitlytrue
by default also.The text was updated successfully, but these errors were encountered: