[transform-typescript] Fix import elision for type exports (#12122)

This commit is contained in:
Иван Плесских 2020-09-30 00:35:57 +05:00 committed by GitHub
parent e0b2bfb78f
commit 7ad9917793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,8 @@ function isInType(path) {
case "TSExpressionWithTypeArguments":
case "TSTypeQuery":
return true;
case "ExportSpecifier":
return path.parentPath.parent.exportKind === "type";
default:
return false;
}

View File

@ -0,0 +1,5 @@
import {A, T} from './mod';
A;
import B, {T1} from './mod';
B;
export type {T, T1};

View File

@ -0,0 +1,4 @@
import { A } from './mod';
A;
import B from './mod';
B;