Fix empty exports (#225)
```js export {}; ``` was printed as ```js export ``` which is invalid. This was discovered by #223master
parent
05be0eb31b
commit
0e1afd6312
|
@ -1870,6 +1870,8 @@ function printExportDeclaration(path, options, print) {
|
||||||
}
|
}
|
||||||
|
|
||||||
parts.push(";");
|
parts.push(";");
|
||||||
|
} else {
|
||||||
|
parts.push("{};");
|
||||||
}
|
}
|
||||||
|
|
||||||
return concat(parts);
|
return concat(parts);
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
exports[`test empty.js 1`] = `
|
||||||
|
"export {};
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
export {};
|
||||||
|
"
|
||||||
|
`;
|
|
@ -0,0 +1 @@
|
||||||
|
export {};
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname);
|
Loading…
Reference in New Issue