Add type safety to a JavaScript project without rewriting it in TypeScript.
Catch type mismatches (like passing a string where a number is expected) before running code.
Refactor large codebases with confidence, knowing Flow will flag broken references.
Integrate type checking into your editor to see errors as you type.
OCaml build dependency and Node.js runtime required; compilation from source needed.
Flow is a static type checker for JavaScript, a tool that reads your JavaScript code and checks for type errors before you run it. JavaScript is a dynamically typed language, meaning that mistakes like passing a text string where a number is expected often only surface as errors at runtime. Flow catches those mistakes during development, acting like an automated proofreader that spots inconsistencies in how data flows through your code. Flow adds an optional layer of type annotations to JavaScript. You can label variables, function parameters, and return values with their expected types (for example, indicating that a function should always receive a number and return a string). Flow then analyzes the code and reports anywhere these expectations are violated, even in code paths you haven't explicitly annotated, because it infers types from how values are used. The tool runs as a background server that monitors your files, so it can give you feedback quickly as you edit. You interact with it through a command-line tool or through editor integrations. The codebase itself is written in OCaml (a statically typed programming language well-suited for compilers and analysis tools), and pre-built binaries are available for macOS, Linux (both x86_64 and arm64), and Windows. For projects that need to parse Flow-typed JavaScript from within a JavaScript environment, the parser is separately published as an npm package called flow-parser. You would use Flow on a JavaScript codebase where you want the safety benefits of type checking, catching bugs early, improving code readability, and making refactoring safer, without switching to a different language. Flow is licensed under MIT.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.