Skip to content

Commit 8a2ae06

Browse files
committed
fix: including types in resulting code
closes #48
1 parent 393faa1 commit 8a2ae06

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
224224
ts.isNamedImports
225225
);
226226
return name || namedBindings
227-
? ts.updateImportClause(node, name, namedBindings)
227+
? ts.updateImportClause(node, name, namedBindings, node.isTypeOnly)
228228
: undefined;
229229
}
230230
function visitNamedImportBindings(
@@ -273,7 +273,8 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
273273
node.decorators,
274274
node.modifiers,
275275
node.exportClause,
276-
fileLiteral
276+
fileLiteral,
277+
node.isTypeOnly
277278
);
278279
}
279280

@@ -290,7 +291,8 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
290291
node.decorators,
291292
node.modifiers,
292293
node.exportClause,
293-
fileLiteral
294+
fileLiteral,
295+
node.isTypeOnly
294296
)
295297
: undefined;
296298
}

0 commit comments

Comments
 (0)