You can opt-in on a per file basis by simply adding a
/* @flow */ comment to
the top of your source file. Flow uses type inference to find errors without
further guidance. You can add type assertions by annotating your
program with types.
you need it, the
any type lets you opt-out of type
When you start Flow, it performs an initial analysis of all the files in your codebase and stores the results in a persistent server. When you save a file, Flow incrementally rechecks the changes in the background.
In short, you don’t need to wait for Flow to check your code.
Flow uses control flow analysis to deeply understand your code to find errors that other type systems can’t. Flow is designed to find errors and we take soundness seriously.
For example, Flow tracks
null values which may propagate unintentionally
through code and eventually cause a runtime error. Flow’s path sensitive
analysis can uncover bugs like this, even through layers of indirection in the
program’s control flow.