Strip flow type annotations from your output code.
$ npm install babel-plugin-transform-flow-strip-types
.babelrc
{
"plugins": ["transform-flow-strip-types"]
}
$ babel --plugins transform-flow-strip-types script.js
require("babel-core").transform("code", {
plugins: ["transform-flow-strip-types"]
});