Whats the reason for not simply using https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-flow-comments ? To answer my question, it is because babel-plugin-transform-flow-comments will not work if you transpile the code to ES5, e.g. in case of ES6 classes getting transpiled down to ES3 functions. See https://github.com/facebook/flow/issues/1996#issuecomment-243762660 for reference.

Written by

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store