New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return type is lost in transform-classes #4665
Comments
Hmm we need to check if its just not printing it out (babel-generator) or the transform is dropping it for some reason (transform-class) Also whats the reason for not striping the flow types in the same config? |
I found it when trying out transform-flow-comments so I'm pretty sure it is not just the printer. |
Oh this is with flow-comments only? There are some issues with it because of the transforms - there was an old issue https://github.com/babel-plugins/babel-plugin-flow-comments/issues/17 and pr (https://github.com/babel-plugins/babel-plugin-flow-comments/pull/18) about this. What about https://babeljs.io/docs/plugins/transform-flow-strip-types/? |
awesome @danharper made a fix #4668. so fast |
@hzoo No, this is not related to
|
Input Code
Output Code
Expected Behavior
I expect the return type to be kept on the function expression.
Current Behavior
Type annotation is removed.
The text was updated successfully, but these errors were encountered: