website/docs/glossary.md
A short glossary of Flow terminology. Each entry is a one-sentence definition followed by a link to the full reference page. Where helpful, an entry also notes how the concept relates to a similar one in TypeScript.
typeof, instanceof, equality, or a type guard. See Type Refinements.?T) — Flow shorthand for the union T | null | void, used to express values that may be absent; TypeScript has no direct equivalent and typically writes T | null | undefined. See Maybe Types.... (e.g. {foo: number, ...}) that allows additional unknown properties beyond those listed. See Exact and inexact object types.... (e.g. {...A, b: T}), producing a new object type that combines A's properties with the additional members, mirroring runtime object spread. See Object type spread.[key: K]: V that allows reads and writes for any key whose type matches K and any value whose type matches V, used to type objects that are used as maps. See Objects as maps.{type: 'A', ...} | {type: 'B', ...}) that each set a different literal type for a shared discriminant property, letting Flow refine the union to a specific arm by checking that property. See Disjoint Object Unions.never. See Empty.implies) — A predicate function whose return type is implies param is T, which refines the parameter to T only when the function returns true and leaves it unchanged otherwise; this has no TypeScript equivalent. See Type Guards.obj.method without calling it, destructuring it, or .bind()-ing it), since doing so would lose the this type that the method depends on. See Class Methods.import typeof — A Flow-specific import form that brings in the type of a value export from another module so it can be used as a type annotation. See Module Types..js.flow) — A .flow file placed next to a .js implementation that completely shadows the implementation's types when Flow is checking code. See Declaration Files.flow-typed/ that declares the type signature of a third-party module Flow cannot type-check directly. See Library Definitions.[signature-verification-failure] error refers to when it cannot do so. See Module Exports.component) — A first-class Flow keyword for declaring React components with named props, optional ref, and render-type support, replacing hand-written function-component types. See Component Syntax.component(...)) — The type-level form of Component Syntax, used to describe the type of a React component (especially in libdefs and HOCs) without defining one. See Component Types.renders) — A type that constrains what a component is allowed to render, enabling library authors to enforce composition rules like "a Menu only renders MenuItems". See Render Types.hook) — A first-class Flow keyword for declaring React hooks, which lets Flow enforce the Rules of React on hook call sites. See Hook Syntax.enum. See Flow Enums.match (...) { pattern => ... } construct that pattern-matches a value with structural patterns, guards, and exhaustiveness checking. See Match Expressions and Statements.match and by switch over Flow Enums, or on demand for arbitrary switch statements by casting the default branch to empty.@flow pragma — A // @flow comment at the top of a file that, by default, opts that file into Flow type checking. See Getting Started.@flow strict / @flow strict-local) — A file-level pragma that turns on a configurable set of stricter lint rules (banning any, etc.) on a per-file basis; the more common @flow strict-local variant is the same but does not require dependencies to also be strict. See Flow Strict.$FlowFixMe[code]) — A comment placed immediately above a Flow error that silences that specific error code without fixing the underlying issue, used when Flow is too conservative or a fix is deferred. See Error Suppressions.sketchy-null, untyped-import) on top of regular type errors. See Linting Overview.