Package Exports
- babel-preset-flow
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-preset-flow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-preset-flow
Babel preset for all Flow plugins.
This preset includes the following plugins:
Example
In
function foo(one: any, two: number, three?): string {}
Out
function foo(one, two, three) {}
Installation
npm install --save-dev babel-preset-flow
Usage
Via .babelrc
(Recommended)
.babelrc
{
"presets": ["flow"]
}
Via CLI
babel --presets flow script.js
Via Node API
require("babel-core").transform("code", {
presets: ["flow"]
});