facebookarchive / flow-remove-types

🚿 Removes Flow type annotations from JavaScript files with speed and simplicity.
MIT License
467 stars 52 forks source link

Add --comment option #68

Closed clintwood closed 5 years ago

clintwood commented 6 years ago

This PR adds a -C, --comment options to Transform flow types to flow Comment Types in output.

E.g. $ flow-remove-types --comment source.js

/* flow */

// Import types
import type { SomeType } from 'some-module';

outputs:

/* flow */

// Import types
/*:: import type { SomeType } from 'some-module'; */

Closes #66.

swac commented 6 years ago

What's needed to get this PR merged? This feature would be great to have!

clintwood commented 6 years ago

@leebyron, please could you take a look at this PR and PR #64 - the last release to flow-remove-types was Oct 18, 2017

motiz88 commented 5 years ago

Hi! I apologise for how long it's taken us to look at this. It looks like a really valuable feature, and as I'm doing some work on this package towards a v2 release, I'd love to get this in as well.

That said, I have some concerns about the code as-is. @clintwood, would you have the bandwidth to address some feedback here?

clintwood commented 5 years ago

With the greatest of respect I have switched to Typescript and do not have time to dig into this any longer. Please feel free to close or fork my branch and make the above changes. Thanks.