Skip to content

Commit

Permalink
Fix type exports import elision
Browse files Browse the repository at this point in the history
  • Loading branch information
Amareis committed Sep 29, 2020
1 parent 77ac0ca commit 9af4465
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/babel-plugin-transform-typescript/src/index.js
Expand Up @@ -13,6 +13,8 @@ function isInType(path) {
case "TSExpressionWithTypeArguments":
case "TSTypeQuery":
return true;
case "ExportSpecifier":
return path.parentPath.parent.exportKind === "type";
default:
return false;
}
Expand Down
@@ -0,0 +1,5 @@
import {A, T} from './mod';
A;
import B, {T1} from './mod';
B;
export type {T, T1};
@@ -0,0 +1,4 @@
import { A } from './mod';
A;
import B from './mod';
B;

0 comments on commit 9af4465

Please sign in to comment.