Babel Plugin Flow Prepack
A babel plugin which transforms Flow annotations into prepack model declarations.
What?
Turns code like this:
type Status = string; declare var someGlobal: foo: number bar: string status: Status;
Into code like this:
const Status = 'string';
So that you can use Flow type annotations to give type hints to prepack.
Installation
npm install --save-dev babel-plugin-flow-prepack
Next, add the following to your babel configuration or .babelrc
: