Ensure importKind is printed (#718)

This commit is contained in:
Brian Ng authored and Christopher Chedeau committed 2017-02-15 12:56:34 -08:00
1 parent 1b37cb0365
commit e0f82cd7d9
3 files changed
+24

No files matched your search

+4
View File
@@ -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";