From 8a2ae067715af8da3946bf2c6207f3138fa3955d Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Mon, 6 Apr 2020 14:35:09 -0400 Subject: [PATCH] fix: including types in resulting code closes #48 --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3caf3249..acabbb32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -224,7 +224,7 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => ( ts.isNamedImports ); return name || namedBindings - ? ts.updateImportClause(node, name, namedBindings) + ? ts.updateImportClause(node, name, namedBindings, node.isTypeOnly) : undefined; } function visitNamedImportBindings( @@ -273,7 +273,8 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => ( node.decorators, node.modifiers, node.exportClause, - fileLiteral + fileLiteral, + node.isTypeOnly ); } @@ -290,7 +291,8 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => ( node.decorators, node.modifiers, node.exportClause, - fileLiteral + fileLiteral, + node.isTypeOnly ) : undefined; }