Fix bug with importing empty type (#904)
This commit is contained in:
1 parent
c852d1631c
commit
f6bbc2ed2e
3 files changed
+5
No files matched your search
@@ -529,6 +529,8 @@ function genericPrintNoParens(path, options, print) {
|
||||
}
|
||||
|
||||
fromParts.push(grouped.length === 0 ? line : " ", "from ");
|
||||
} else if (n.importKind && n.importKind === "type") {
|
||||
parts.push("{} from ");
|
||||
}
|
||||
|
||||
fromParts.push(path.call(print, "source"), ";");
|
||||
|
||||
@@ -353,12 +353,14 @@ exports[`import_type_specifier.js 1`] = `
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from \\"../module\\";
|
||||
import type {} from 'foo';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from \\"../module\\";
|
||||
import type {} from \\"foo\\";
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from "../module";
|
||||
import type {} from 'foo';
|
||||
Reference in new issue
Block a user