Add support for flow export type star (#2542)

master
Brian Ng 2017-07-25 18:00:20 -05:00 committed by Lucas Azzola
parent 26842e4d69
commit 60f5836b37
4 changed files with 20 additions and 1 deletions

View File

@ -618,7 +618,16 @@ function genericPrintNoParens(path, options, print, args) {
case "ExportNamedDeclaration":
return printExportDeclaration(path, options, print);
case "ExportAllDeclaration":
return concat(["export * from ", path.call(print, "source"), semi]);
parts.push("export ");
if (n.exportKind === "type") {
parts.push("type ");
}
parts.push("* from ", path.call(print, "source"), semi);
return concat(parts);
case "ExportNamespaceSpecifier":
case "ExportDefaultSpecifier":
return path.call(print, "exported");

View File

@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`type.js 1`] = `
export type * from "module";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export type * from "module";
`;

View File

@ -0,0 +1 @@
run_spec(__dirname, null, ["babylon"]);

View File

@ -0,0 +1 @@
export type * from "module";