diff --git a/lib/printer.js b/lib/printer.js index c8525c8a..c686315a 100644 --- a/lib/printer.js +++ b/lib/printer.js @@ -383,9 +383,18 @@ function genericPrintNoParens(path, options, print) { return fromString("*"); case "ImportNamespaceSpecifier": - return concat(["* as ", path.call(print, "id")]); + var parts = ["* as "]; + if (n.local) { + parts.push(path.call(print, "local")); + } else if (n.id) { + parts.push(path.call(print, "id")); + } + return concat(parts); case "ImportDefaultSpecifier": + if (n.local) { + return path.call(print, "local"); + } return path.call(print, "id"); case "ExportDeclaration":