babel / babel/minify

Flow annotation is incorrectly removed?

Open
#357 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4.4k
Forks
217
PR merge metrics
No merged PRs in 30d

Description

```js
require('babel-core').transform('export default function(foo: string, bar: string = baz()) { }', {plugins:['syntax-flow'],passPerPreset:true,presets:['babili']}).code
```
gives me this:
```js
export default function (a: string, b = baz()) {}
```

Shouldn't this be:
```js
export default function (a: string, b: string = baz()) {}
```

/cc @boopathi

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.