mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 10:46:28 -05:00
fix(49419): Referencing this through a variable causes "Rename Symbol" to misbehave in Javascript (#56540)
This commit is contained in:
@@ -46946,9 +46946,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
case AssignmentDeclarationKind.ExportsProperty:
|
||||
case AssignmentDeclarationKind.PrototypeProperty:
|
||||
return getSymbolOfNode(entityName.parent);
|
||||
case AssignmentDeclarationKind.Property:
|
||||
if (isPropertyAccessExpression(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) {
|
||||
return undefined;
|
||||
}
|
||||
// falls through
|
||||
case AssignmentDeclarationKind.ThisProperty:
|
||||
case AssignmentDeclarationKind.ModuleExports:
|
||||
case AssignmentDeclarationKind.Property:
|
||||
return getSymbolOfDeclaration(entityName.parent.parent as BinaryExpression);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user