Adds static typing to JavaScript to improve developer productivity and code quality.
Adds static typing to JavaScript to improve developer productivity and code quality.
Flow is a static typechecker for JavaScript. To find out more about Flow, check out flow.org.
Flow works with:
There are binary distributions for each of these platforms and you can also build it from source on any of them as well.
Check out the installation instructions, and then the usage docs.
Flow's parser is available as a compiled-to-JavaScript module published to npm, named flow-parser. Most end users of Flow will not need to use this parser directly, but JavaScript packages which make use of parsing Flow-typed JavaScript can use this to generate Flow's syntax tree with annotated types attached.
Flow is written in Rust. GitHub CI builds Flow from the rust_port workspace with nightly Rust.
Install system dependencies:
Install Rust via rustup.
Install the nightly Rust toolchain:
rustup toolchain install nightlyBuild the Rust workspace:
cd rust_port
cargo +nightly buildRun the Rust tests:
cargo +nightly testBuild an optimized flow binary:
cargo +nightly build --release --bin flow_cliBuild flow.js (optional):
The flow.js build also uses the Rust port. Install Emscripten, Node, Yarn, and a Rust nightly toolchain with the wasm32-unknown-emscripten target and rust-src component first. GitHub CI uses Emscripten 3.1.44 and nightly Rust for this build.
rustup toolchain install nightly-2026-04-14 --target wasm32-unknown-emscripten --component rust-src
RUSTUP_TOOLCHAIN=nightly-2026-04-14 make js FLOW_JS_IMPL=rust-wasm This produces bin/flow.js.
To build a faster, larger local development version instead, run:
RUSTUP_TOOLCHAIN=nightly-2026-04-14 make js FLOW_JS_IMPL=rust-wasm FLOW_DOT_JS_WASM_PROFILE=devThe Flow parser can also be compiled to JavaScript. Read how here.
See tests/README.md for detailed testing documentation.
Flow is MIT-licensed (LICENSE). The website and documentation are licensed under the Creative Commons Attribution 4.0 license (website/LICENSE-DOCUMENTATION).
[flow-for-vscode] Ship the Try Flow grammar so VS Code highlights component and hook syntax
Memory leak
Configure auto import
Flow’s parser does not understand `export from` attributes (the `with { type: "json" }` syntax).
`flow-remove-types` throws a syntax error on ES `import` attributes
[Discussion]: Any plans to make Flow more interpopble with TS ecosystem?
☂️ Known unsoundness issues
Cannot resolve JSON file starting with a dot
If a `name_mapper` points to a non-existent file, it should tell user that the mapped path doesn't exist (instead of the original path)
Add a prefix to Flow specific AST node type