Flow - Am I Your Type?
summary
Flow is an open source static type checker from Facebook that finds JavaScript type errors via inference and gradual annotations, integrates with Babel and ESLint, and runs a background flow server to track types. Key claims: Flow catches errors without full annotations, supports React/JSX, and lets Babel strip types at build time. Practical demo wires npm scripts, flow-typed defs (about 570 available vs TypeScript’s ~2,000), uses lodash and a small file-processing module (liner) and runs successfully after flow and Babel strip types.
AI-written summary · about
chapters (41)
- 0:00Intro
- 2:07Outline
- 2:40Static vs. Dynamic
- 3:08Why Use Types?
- 4:24Why Avoid Types?
- 5:32Flow Overview
- 6:54TypeScript Overview
- 10:03Comparing Flow & TypeScript
- 11:40Installing Flow
- 12:06Running Flow
- 13:05Type Suggestions
- 13:47Executing Code With Types ...
- 15:33Flow Analysis Example
- 16:29Uninitialized References
- 17:50Flow Types
- 18:59Maybe Type
- 21:26Basic Types Example
- 22:13Builtin Types
- 24:16Functions
- 25:52Arrays
- 27:22Objects
- 29:38Classes
- 34:06Unions For Enums
- 35:42Sharing Type Aliases Example
- 36:59Escape Hatch
- 37:40Flow Server ...
- 40:56Flow Project Checklist
- 42:03Dev Dependencies
- 43:30Recommended npm Scripts
- 44:53Babel Setup
- 45:11flowconfig File
- 47:44flow-typed
- 48:48Editor/IDE Setup...
- 49:46Sample Project
- 50:45Project Dependencies
- 51:04The Code ...
- 53:49Summary
- 55:01Bonus Slides
- 55:35Nominal vs. Structural Typing
- 56:59Variance in Flow & TypeScript
- 57:50Soundness vs. Correctness
related talks
43mFlow - Am I Your Type?
28mA Deepdive Into Flow
23mFlow or how I learned to stop worrying and typecheck my React code
42mStatic Type Checking with FlowType
17mThis will flow your mind
30mFlow Typing a React Codebase
28mPractical Confidence: Using Types to Help Your Computer Help You
16mAll aboard the type train
