JSPM

  • Created
  • Published
  • Downloads 7479819
  • Score
    100M100P100Q221596F
  • License MIT

Babel preset for all Flow plugins.

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

.babelrc

{
  "presets": ["@babel/preset-flow"]
}

Via CLI

babel --presets @babel/preset-flow script.js

Via Node API

require("@babel/core").transform("code", {
  presets: ["@babel/preset-flow"]
});