-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Flow version: 0.295.0
Expected behavior
According to MDN:
export fromsupports all features thatimportsupports — for example, import attributes.
So the following should be valid:
/** @file export.js */
export { default } from "./htmlhint.json" with { type: "json" };/** @file index.js */
import ruleset from "./export.js";
console.log(ruleset);Running:
node index.jsshould output the contents of htmlhint.json as an object:
{ "tagname-lowercase": true }And processing with Flow should succeed:
npx flow-remove-types --out-file ./export.out.js ./export.js --allExpected result:
./export.js
↳ ./export.out.jsActual behavior
Flow fails to parse the with { type: "json" } attribute on export from:
./export.js
↳ Syntax Error: ';' expected (2:42)
export { default } from "./htmlhint.json" with { type: "json" };
^
1: export { default } from "./htmlhint.json" with { type: "json" };