mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Bind assignments to 'this' within static blocks in JS files (#46472)
* Add failing test case. * Handle 'this' assignments on class static blocks in JavaScript. * Accepted baselines.
This commit is contained in:
committed by
GitHub
parent
de1ac8191e
commit
334b8eaa57
@@ -2947,6 +2947,7 @@ namespace ts {
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
case SyntaxKind.ClassStaticBlockDeclaration:
|
||||
// this.foo assignment in a JavaScript class
|
||||
// Bind this property to the containing class
|
||||
const containingClass = thisContainer.parent;
|
||||
|
||||
Reference in New Issue
Block a user