The easiest way to introduce flow type annotation through browserify.
npm install --save-dev \
flowify \
babel-plugin-typecheck \
babel-plugin-syntax-flow \
babel-plugin-transform-flow-strip-types
// basic grunt example
grunt.initConfig({
browserify: {
options: {
transform: ['flowify', 'hintify', 'babelify']
}
}
});