Skip to content

Commit

Permalink
remove type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen committed Apr 18, 2021
1 parent 0900241 commit ed20e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/typescript/transformers/imports_exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function typescriptTransformImportsExportsTransformer(
return (node: ts.Node) => {
if (ts.isImportDeclaration(node)) {
const importClause = node.importClause;
if (importClause?.isTypeOnly) return node;
if (importClause?.isTypeOnly) return undefined;
if (ts.isStringLiteral(node.moduleSpecifier)) {
const resolvedSpecifier = resolve(node.moduleSpecifier.text);

Expand Down Expand Up @@ -129,7 +129,7 @@ export function typescriptTransformImportsExportsTransformer(
}
return node;
} else if (ts.isExportDeclaration(node)) {
if (node.isTypeOnly) return node;
if (node.isTypeOnly) return undefined;
if (
node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier)
) {
Expand Down

0 comments on commit ed20e6a

Please sign in to comment.