I'd prefer that approach too, as I can also document things at the same time as providing type annotations; flow-jsdoc looks interesting, but I don't know how easy it would be to plug into a Babel/Webpack+Babel workflow:
function somefunction(somestring/*: string*/)/*: boolean */ {
var ret/*: boolean */;
...
return ret;
}
(See https://flowtype.org/blog/2015/02/20/Flow-Comments.html)It can also build really nice HTML documentation to.