← 返回命令列表

Linux command

flow 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Type check project

flow check

Start Flow server

flow server

Check single file

flow check-contents < [file.js]

Initialize Flow config

flow init

Get type at

flow type-at-pos [file.js] [10] [5]

说明

flow is a static type checker for JavaScript from Facebook. It adds gradual typing through type annotations and inference, catching errors before runtime. The tool runs as a background server for fast incremental checking. Type annotations use a superset of JavaScript syntax, stripped at build time. Flow integrates with editors for real-time type checking and provides detailed error messages with suggested fixes.

参数

check
Type check all files.
server
Start background server.
status
Show server status and errors.
init
Create .flowconfig file.
stop
Stop background server.
type-at-pos _FILE_ _LINE_ _COL_
Get type at position.
--help
Display help information.

FAQ

What is the flow command used for?

flow is a static type checker for JavaScript from Facebook. It adds gradual typing through type annotations and inference, catching errors before runtime. The tool runs as a background server for fast incremental checking. Type annotations use a superset of JavaScript syntax, stripped at build time. Flow integrates with editors for real-time type checking and provides detailed error messages with suggested fixes.

How do I run a basic flow example?

Run `flow check` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does check do in flow?

Type check all files.