Destructuring of unknown
catch variable is not an error
#47383
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
Bug Report
π Search Terms
catch, destructure, destructuring, useUnknownInCatchVariables
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Destructuring
unknown
is an error, but destructuring a catch variable, which is of typeunknown
is not an error.π Expected behavior
I would expect destructuring of a catch variable of type
unknown
to produce an error.The text was updated successfully, but these errors were encountered: