You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gregory Rudolph
8a6e029f83
|
4 years ago | |
---|---|---|
.. | ||
lib | 4 years ago | |
.npmignore | 4 years ago | |
README.md | 4 years ago | |
package.json | 4 years ago |
README.md
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"]
});