Add ability to require()
Flow modules and files using
flow-remove-types.
npm i @druide/flow-remove-types-register --save
Require this module at your program entry point (index.js):
require('@druide/flow-remove-types-register')()
or at your module entry point:
require('@druide/flow-remove-types-register')({module: 'moduleName'})
Write you code with Flow:
// @flow
Flow cannot be used at program or module entry point directly.
Declare your index.js
this way:
require('@druide/flow-remove-types-register')()
require('./my-app-with-flow')
Also notice some program startup time slow down due to source files pre-processing.