babel/packages/babel-plugin-transform-flow-strip-types
jbrown215 c28465e03e Flow opaque type 6.x backport (#6081)
* Flow opaque type backport

* Add tests for strip types, comments, and babel-generator

* Fix failing tests, run scripts

* Bump babylon to 6.18.0
2017-08-15 16:44:15 -04:00
..
2017-01-14 09:48:52 -05:00
2017-01-19 19:33:22 -05:00

babel-plugin-transform-flow-strip-types

Strip all flow type annotations and declarations from your output code.

Example

In

function foo(one: any, two: number, three?): string {}

Out

function foo(one, two, three) {}

Installation

npm install --save-dev babel-plugin-transform-flow-strip-types

Usage

.babelrc

{
  "plugins": ["transform-flow-strip-types"]
}

Via CLI

babel --plugins transform-flow-strip-types script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-flow-strip-types"]
});