Infer class property declarations from assignments in nested arrow functions

This commit is contained in:
Mohamed Hegazy
2017-03-12 15:00:24 -07:00
parent 6632e324ed
commit 3ac54e8a47
5 changed files with 406 additions and 52 deletions

View File

@@ -2332,6 +2332,7 @@ namespace ts {
function bindThisPropertyAssignment(node: BinaryExpression) {
Debug.assert(isInJavaScriptFile(node));
const container = getThisContainer(node, /*includeArrowFunctions*/false);
switch (container.kind) {
case SyntaxKind.FunctionDeclaration:
case SyntaxKind.FunctionExpression:
@@ -2342,6 +2343,7 @@ namespace ts {
break;
case SyntaxKind.Constructor:
case SyntaxKind.PropertyDeclaration:
case SyntaxKind.MethodDeclaration:
case SyntaxKind.GetAccessor:
case SyntaxKind.SetAccessor: