TypeScript · Type Checking
useUnknownInCatchVariables
Default catch clause variables as 'unknown' instead of 'any'.
Syntax
"useUnknownInCatchVariables": trueExample
Example
{
"compilerOptions": {
"useUnknownInCatchVariables": true
}
}More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.