File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,7 @@ import {
476
476
isCallOrNewExpression,
477
477
isCallSignatureDeclaration,
478
478
isCatchClause,
479
+ isCatchClauseVariableDeclaration,
479
480
isCatchClauseVariableDeclarationOrBindingElement,
480
481
isCheckJsEnabledForFile,
481
482
isClassDeclaration,
@@ -27461,7 +27462,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
27461
27462
case SyntaxKind.ObjectBindingPattern:
27462
27463
case SyntaxKind.ArrayBindingPattern:
27463
27464
const rootDeclaration = getRootDeclaration(node.parent);
27464
- return isVariableDeclaration(rootDeclaration) ? isVarConstLike(rootDeclaration) : !isSomeSymbolAssigned(rootDeclaration);
27465
+ return isParameter(rootDeclaration) || isCatchClauseVariableDeclaration(rootDeclaration)
27466
+ ? !isSomeSymbolAssigned(rootDeclaration)
27467
+ : isVariableDeclaration(rootDeclaration) && isVarConstLike(rootDeclaration);
27465
27468
}
27466
27469
return false;
27467
27470
}
You can’t perform that action at this time.
0 commit comments