@babel/plugin-syntax-flow
Version:
Allow parsing of the flow syntax
27 lines (24 loc) • 681 B
JavaScript
import { declare } from '@babel/helper-plugin-utils';
const index = declare((api, options) => {
api.assertVersion("^7.0.0-0 || ^8.0.0");
const {
all,
enums
} = options;
if (typeof all !== "boolean" && all !== undefined) {
throw new Error(".all must be a boolean, or undefined");
}
if (enums !== undefined) {
throw new Error("The .enums option has been removed and it's now always enabled. Please remove it from your config.");
}
return {
name: "syntax-flow",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push(["flow", {
all
}]);
}
};
});
export { index as default };
//# sourceMappingURL=index.js.map