Add support for flow export type star (#2542)
parent
26842e4d69
commit
60f5836b37
|
@ -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");
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`type.js 1`] = `
|
||||
export type * from "module";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export type * from "module";
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, null, ["babylon"]);
|
|
@ -0,0 +1 @@
|
|||
export type * from "module";
|
Loading…
Reference in New Issue