Getting Started
Flow is a static type checker for your JavaScript code. It does a lot of work to make you more productive. It helps you code faster, smarter, more confidently, and at a bigger scale.
Flow checks your code for errors through static type annotations. These types allow you to tell Flow how you want your code to work, and Flow will make sure it does work that way.
1function square(n: number): number {2 return n * n;3}4
5square("2"); // Error!incompatible-typeCannot call square with "2" bound to n because string [1] is incompatible with number [2].First step: install Flow.