From 0eaf9f1343e12f0f9b999c2178a34f418984a35b Mon Sep 17 00:00:00 2001 From: Reyad Attiyat Date: Thu, 12 Jan 2017 23:22:40 -0600 Subject: [PATCH] Fix: Create body for multiple call signatures (fixes #92) --- lib/ast-converter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ast-converter.js b/lib/ast-converter.js index 7064f26..c59524a 100644 --- a/lib/ast-converter.js +++ b/lib/ast-converter.js @@ -1095,6 +1095,12 @@ module.exports = function(ast, extra) { method.returnType = convertTypeAnnotation(node.type); } + if (!method.body) { + method.body = { + type: "EmptyFunctionStatement" + }; + } + if (parent.kind === SyntaxKind.ObjectLiteralExpression) { method.params = node.parameters.map(convertChild);