From d39749ffe5afc25831fff62ba938b679634d351e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 20 Nov 2014 15:22:28 -0800 Subject: [PATCH] Adding SyntaxKind.FunctionType/ConstructorType to isAnyFunction --- src/compiler/parser.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cd3a5ecb05f..435957990ae 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -412,16 +412,18 @@ module ts { export function isAnyFunction(node: Node): boolean { if (node) { switch (node.kind) { - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: case SyntaxKind.Method: + case SyntaxKind.Constructor: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.IndexSignature: + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionDeclaration: return true; } }