From 02cc7d4ad06defff442f32e56b5fa80b90a64bcf Mon Sep 17 00:00:00 2001 From: Diego Landa Date: Mon, 22 May 2017 01:13:03 -0400 Subject: [PATCH] Check if method name is not undefined --- src/transformAST.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformAST.ts b/src/transformAST.ts index 558b90f4..6789e837 100644 --- a/src/transformAST.ts +++ b/src/transformAST.ts @@ -42,7 +42,7 @@ function getType(prop: ts.PropertySignature): MemberType { } function getMethods(checker: ts.TypeChecker, type: ts.Type, classDeclaratinNode: ts.ClassDeclaration) { - return classDeclaratinNode.members + return classDeclaratinNode.members.filter(x => x.name !== undefined) .map(i => ({ name: i.name.getText() })); }