@@ -15786,22 +15786,22 @@ namespace ts {
15786
15786
}
15787
15787
15788
15788
// In an assignment expression, the right operand is contextually typed by the type of the left operand.
15789
- // Don't do this for special property assignments unless there is a type tag on the assignment, to avoid circularity from checking the right operand .
15789
+ // Don't do this for special property assignments to avoid circularity.
15790
15790
function isContextSensitiveAssignment(binaryExpression: BinaryExpression): boolean {
15791
15791
const kind = getSpecialPropertyAssignmentKind(binaryExpression);
15792
15792
switch (kind) {
15793
15793
case SpecialPropertyAssignmentKind.None:
15794
15794
return true;
15795
15795
case SpecialPropertyAssignmentKind.Property:
15796
- case SpecialPropertyAssignmentKind.ExportsProperty:
15797
- case SpecialPropertyAssignmentKind.Prototype:
15798
- case SpecialPropertyAssignmentKind.PrototypeProperty:
15799
15796
// If `binaryExpression.left` was assigned a symbol, then this is a new declaration; otherwise it is an assignment to an existing declaration.
15800
15797
// See `bindStaticPropertyAssignment` in `binder.ts`.
15801
- return !binaryExpression.left.symbol || binaryExpression.left.symbol.valueDeclaration && !!getJSDocTypeTag(binaryExpression.left.symbol.valueDeclaration) ;
15802
- case SpecialPropertyAssignmentKind.ThisProperty :
15798
+ return !binaryExpression.left.symbol;
15799
+ case SpecialPropertyAssignmentKind.ExportsProperty :
15803
15800
case SpecialPropertyAssignmentKind.ModuleExports:
15804
- return !binaryExpression.symbol || binaryExpression.symbol.valueDeclaration && !!getJSDocTypeTag(binaryExpression.symbol.valueDeclaration);
15801
+ case SpecialPropertyAssignmentKind.PrototypeProperty:
15802
+ case SpecialPropertyAssignmentKind.ThisProperty:
15803
+ case SpecialPropertyAssignmentKind.Prototype:
15804
+ return false;
15805
15805
default:
15806
15806
return Debug.assertNever(kind);
15807
15807
}
0 commit comments