mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix crash in JS when checking destructuring shorthand assignment (#25529)
This commit is contained in:
@@ -21128,7 +21128,7 @@ namespace ts {
|
||||
getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], UnionReduction.Subtype) :
|
||||
leftType;
|
||||
case SyntaxKind.EqualsToken:
|
||||
const special = getSpecialPropertyAssignmentKind(left.parent as BinaryExpression);
|
||||
const special = isBinaryExpression(left.parent) ? getSpecialPropertyAssignmentKind(left.parent) : SpecialPropertyAssignmentKind.None;
|
||||
checkSpecialAssignment(special, right);
|
||||
if (isJSSpecialPropertyAssignment(special)) {
|
||||
return leftType;
|
||||
|
||||
Reference in New Issue
Block a user