Ensure importKind is printed (#718)
This commit is contained in:
1 parent
1b37cb0365
commit
e0f82cd7d9
3 files changed
+24
No files matched your search
@@ -376,6 +376,10 @@ function genericPrintNoParens(path, options, print) {
|
||||
return join(" ", parts);
|
||||
case "ImportSpecifier":
|
||||
if (n.imported) {
|
||||
if (n.importKind) {
|
||||
parts.push(path.call(print, "importKind"), " ");
|
||||
}
|
||||
|
||||
parts.push(path.call(print, "imported"));
|
||||
|
||||
if (n.local && n.local.name !== n.imported.name) {
|
||||
|
||||
@@ -345,6 +345,21 @@ function foo() {
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test import_type_specifier.js 1`] = `
|
||||
"/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from \"../module\";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from \"../module\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test issue-359.js 1`] = `
|
||||
"/* @flow */
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import { Foo, type Baz } from "../module";
|
||||
Reference in new issue
Block a user