Flow Type Cheat Sheet
Flow is a static type checker for JavaScript. This is a list of Flow types generated from the source code in https://github.com/facebook/flow/tree/v0.51.1/ The script to generate this list is on github. Fixes welcome. See also my TypeScript cheat sheet, TypeScript React cheat sheet, and Docker cheat sheet.
- There are separate sections for "private" or "magic" types with a
$
in the name. See the note here and comment here. Update: Some these types are now documented here. - Links in bold point to the Flow documentation. Other links point to the Flow source code.
Flow version: v0.111.3 v0.110.1 v0.109.0 v0.108.0 v0.107.0 v0.106.3 v0.105.2 v0.104.0 v0.103.0 v0.102.0 v0.101.1 v0.100.0 v0.99.1 v0.98.1 v0.97.0 v0.96.1 v0.95.2 v0.94.0 v0.93.0 v0.92.1 v0.91.0 v0.90.0 v0.89.0 v0.88.0 v0.87.0 v0.86.0 v0.85.0 v0.84.0 v0.83.0 v0.82.0 v0.81.0 v0.80.0 v0.79.1 v0.78.0 v0.77.0 v0.76.0 v0.75.0 v0.74.0 v0.73.0 v0.72.0 v0.71.0 v0.70.0 v0.69.0 v0.68.0 v0.67.0 v0.66.0 v0.65.0 v0.64.0 v0.63.1 v0.62.0 v0.61.0 v0.60.1 v0.59.0 v0.58.0 v0.57.3 v0.56.0 v0.55.0 v0.54.0 v0.53.1 v0.52.0 v0.51.1 v0.50.0 v0.49.1 v0.48.0 v0.47.0 v0.46.0 v0.45.0
Contents
- Built-in types
- Core
- React
- Document Object Model (DOM)
- Browser Object Model (BOM)
- CSS Object Model (CSSOM)
- indexedDB
- Node.js
- Service Workers
- Streams
Built-ins
Built-in "private" types
Core
- Array<T> (class)
- ArrayBuffer (class)
- AsyncIterable<+T> (type)
- AsyncIterator<+T> (type)
- Boolean (class)
- CallSite (class)
- console (var)
- DataView (class)
- Date (class)
- Error (class)
- EvalError (class)
- exports (var)
- Float32Array (class)
- Float64Array (class)
- Function (class)
- global (var)
- Infinity (var)
- Int16Array (class)
- Int32Array (class)
- Int8Array (class)
- Iterable<+T> (type)
- Iterator<+T> (type)
- IteratorResult<Yield,Return> (type)
- JSON (class)
- Map<K, V> (class)
- Math (var)
- module (var)
- NaN (var)
- Number (class)
- Object (class)
- Promise<+R> (class)
- Proxy<T> (class)
- RangeError (class)
- ReferenceError (class)
- Reflect (class)
- RegExp (class)
- require (var)
- Set<T> (class)
- String (class)
- Symbol (class)
- SyntaxError (class)
- TypeError (class)
- Uint16Array (class)
- Uint32Array (class)
- Uint8Array (class)
- Uint8ClampedArray (class)
- undefined (var)
- URIError (class)
- WeakMap<K, V> (class)
- WeakSet<T: Object> (class)
Core "private" types
- $ArrayBufferView (type)
- $ReadOnlyArray<+T> (class)
- $SymboIsConcatSpreadable mixins Symbol (class)
- $SymbolHasInstance mixins Symbol (class)
- $SymbolIterator mixins Symbol (class)
- $SymbolMatch mixins Symbol (class)
- $SymbolReplace mixins Symbol (class)
- $SymbolSearch mixins Symbol (class)
- $SymbolSpecies mixins Symbol (class)
- $SymbolSplit mixins Symbol (class)
- $SymbolToPrimitive mixins Symbol (class)
- $SymbolToStringTag mixins Symbol (class)
- $SymbolUnscopables mixins Symbol (class)
- $TypedArray (class)
- Date$LocaleOptions (type)
- Number$LocaleOptions (type)
- Proxy$revocable<T> (type)
- Proxy$traps<T> (type)
- RegExp$flags (type)
React
- LegacyReactComponent< DefaultProps, Props, State,> (class)
- react (module)
- Children (var)
- Component (var)
- createClass (var)
- createElement (var)
- DOM (var)
- Element<typeof Component> (var)
- Node (type)
- PropTypes (var)
- PureComponent (var)
- version (var)
- React (module)
- exports (var)
- react-dom (module)
- version (var)
- react-dom/server (module)
- ReactClass<Config> (type)
- ReactPropsChainableTypeChecker (type)
- ReactPropsCheckType (type)
- ReactPropTypes (type)
- SyntheticClipboardEvent (class)
- SyntheticCompositionEvent (class)
- SyntheticDragEvent (class)
- SyntheticEvent (class)
- SyntheticFocusEvent (class)
- SyntheticInputEvent (class)
- SyntheticKeyboardEvent (class)
- SyntheticMouseEvent (class)
- SyntheticTouchEvent (class)
- SyntheticUIEvent (class)
- SyntheticWheelEvent (class)
React "private" types
- React$Element<Config> (class)
- React$Node<Config> (type)
- React$PropTypes$arrayOf (type)
- React$PropTypes$instanceOf (type)
- React$PropTypes$objectOf (type)
- React$PropTypes$oneOf (type)
- React$PropTypes$oneOfType (type)
- React$PropTypes$shape (type)
- React$PureComponent< DefaultProps, Props, State,> (class)
Document Object Model (DOM)
- AnimationEvent (class)
- AnimationEventHandler (type)
- AnimationEventListener (type)
- AnimationEventTypes (type)
- Attr (class)
- AudioTrack (class)
- AudioTrackList (class)
- Blob (class)
- BufferDataSource (type)
- CanvasDrawingStyles (class)
- CanvasFillRule (type)
- CanvasGradient (class)
- CanvasImageSource (type)
- CanvasPattern (class)
- CanvasRenderingContext2D (class)
- CharacterData (class)
- ClientRect (class)
- ClientRectList (class)
- Comment (class)
- CustomElementRegistry (interface)
- customElements (var)
- CustomEvent (class)
- DataTransfer (class)
- DataTransferItem (class)
- DataTransferItemList (class)
- document (var)
- Document (class)
- DocumentFragment (class)
- DocumentType (class)
- DOMError (class)
- DOMImplementation (class)
- DOMTokenList (class)
- DragEvent (class)
- DragEventHandler (type)
- DragEventListener (type)
- DragEventTypes (type)
- Element (class)
- ElementDefinitionOptions (type)
- ElementRegistrationOptions (type)
- Event (class)
- event (var)
- EventHandler (type)
- EventListener (type)
- EventListenerOptionsOrUseCapture (type)
- EventTarget (class)
- File (class)
- FileList (class)
- FilePropertyBag (type)
- FileReader (class)
- FocusEvent (class)
- FocusEventHandler (type)
- FocusEventListener (type)
- FocusEventTypes (type)
- HitRegionOptions (class)
- HTMLAnchorElement (class)
- HTMLAppletElement (class)
- HTMLAudioElement (class)
- HTMLBaseElement (class)
- HTMLBRElement (class)
- HTMLButtonElement (class)
- HTMLCanvasElement (class)
- HTMLCollection<Elem: HTMLElement> (class)
- HTMLDetailsElement (class)
- HTMLDivElement (class)
- HTMLDListElement (class)
- HTMLElement (class)
- HTMLEmbedElement (class)
- HTMLFieldSetElement (class)
- HTMLFormElement (class)
- HTMLHeadingElement (class)
- HTMLHRElement (class)
- HTMLIFrameElement (class)
- HTMLImageElement (class)
- HTMLInputElement (class)
- HTMLLabelElement (class)
- HTMLLegendElement (class)
- HTMLLIElement (class)
- HTMLLinkElement (class)
- HTMLMediaElement (class)
- HTMLMenuElement (class)
- HTMLMetaElement (class)
- HTMLOListElement (class)
- HTMLOptGroupElement (class)
- HTMLOptionElement (class)
- HTMLOptionsCollection (class)
- HTMLParagraphElement (class)
- HTMLPreElement (class)
- HTMLScriptElement (class)
- HTMLSelectElement (class)
- HTMLSlotElement (class)
- HTMLSourceElement (class)
- HTMLSpanElement (class)
- HTMLStyleElement (class)
- HTMLTableCaptionElement (class)
- HTMLTableCellElement (class)
- HTMLTableElement (class)
- HTMLTableRowElement (class)
- HTMLTableSectionElement (class)
- HTMLTemplateElement (class)
- HTMLTextAreaElement (class)
- HTMLUListElement (class)
- HTMLVideoElement (class)
- Image (class)
- ImageBitmap (class)
- ImageData (class)
- KeyboardEvent (class)
- KeyboardEventHandler (type)
- KeyboardEventListener (type)
- KeyboardEventTypes (type)
- localStorage (var)
- MediaError (class)
- MediaSource (class)
- MessageEvent (class)
- MouseEvent (class)
- MouseEventHandler (type)
- MouseEventListener (type)
- MouseEventTypes (type)
- NamedNodeMap (class)
- Node (class)
- NodeFilter (class)
- NodeFilterCallback (type)
- NodeFilterInterface (type)
- NodeIterator<RootNodeT, WhatToShowT> (class)
- NodeList<T> (class)
- parent (var)
- Path2D (class)
- ProgressEvent (class)
- ProgressEventHandler (type)
- ProgressEventListener (type)
- ProgressEventTypes (type)
- PromiseRejectionEvent (class)
- Range (class)
- RenderingContext (type)
- Selection (class)
- SelectionDirection (type)
- SelectionMode (type)
- self (var)
- sessionStorage (var)
- ShadowRoot (interface)
- ShadowRootInit (type)
- ShadowRootMode (type)
- SourceBuffer (class)
- SourceBufferList (class)
- status (var)
- Storage (class)
- SVGMatrix (class)
- TexImageSource (type)
- Text (class)
- TextMetrics (class)
- TextRange (class)
- TextTrack (class)
- TextTrackCue (class)
- TextTrackCueList (class)
- TextTrackList (class)
- TimeRanges (class)
- top (var)
- Touch (class)
- TouchEvent (class)
- TouchEventHandler (type)
- TouchEventListener (type)
- TouchEventTypes (type)
- TouchList (class)
- TrackDefault (class)
- TrackDefaultList (class)
- TreeWalker<RootNodeT, WhatToShowT> (class)
- UIEvent (class)
- URL (class)
- ValidityState (class)
- VertexAttribFVSource (type)
- VideoTrack (class)
- VideoTrackList (class)
- WebGLContextAttributes (type)
- WebGLContextEvent (class)
- WebGLRenderingContext (class)
- WheelEvent (class)
- WheelEventHandler (type)
- WheelEventListener (type)
- WheelEventTypes (type)
- WindowProxy (type)
Document Object Model (DOM) "private" types
Browser Object Model (BOM)
- AnalyserNode (class)
- AudioBuffer (class)
- AudioBufferSourceNode (class)
- AudioContext (class)
- AudioDestinationNode (class)
- AudioListener (class)
- AudioNode (class)
- AudioParam (class)
- BatteryManager (type)
- BiquadFilterNode (class)
- BodyInit (type)
- CacheType (type)
- ChannelMergerNode (class)
- ChannelSplitterNode (class)
- CloseEvent (class)
- ConvolverNode (class)
- Coordinates (class)
- CredentialsType (type)
- DedicatedWorkerGlobalScope (class)
- DelayNode (class)
- DOMParser (class)
- DynamicsCompressorNode (class)
- FormData (class)
- FormDataEntryValue (type)
- GainNode (class)
- Gamepad (type)
- GamepadButton (type)
- GamepadHapticActuator (type)
- GamepadPose (type)
- Geolocation (class)
- Headers (class)
- HeadersInit (type)
- History (class)
- history (var)
- Location (class)
- location (var)
- MediaElementAudioSourceNode (class)
- MediaStream (class)
- MediaStreamAudioSourceNode (class)
- MediaStreamTrack (class)
- MessageChannel (class)
- MessagePort (class)
- MimeType (class)
- MimeTypeArray (class)
- ModeType (type)
- MutationObserver (class)
- MutationObserverInit (type)
- MutationObserverInitRequired (type)
- MutationRecord (class)
- navigator (var)
- Navigator mixins NavigatorCommon (class)
- NavigatorCommon (class)
- NodeFilter (var)
- OscillatorNode (class)
- PannerNode (class)
- Performance (class)
- performance (var)
- PerformanceEntry (class)
- PerformanceEntryFilterOptions (type)
- PerformanceNavigation (class)
- PerformanceNavigationTiming (class)
- PerformanceResourceTiming (class)
- PerformanceTiming (class)
- PeriodicWave (class)
- Plugin (class)
- PluginArray (class)
- Position (class)
- PositionError (class)
- PositionOptions (type)
- RedirectType (type)
- ReferrerPolicyType (type)
- Request (class)
- RequestInfo (type)
- RequestOptions (type)
- Response (class)
- ResponseOptions (type)
- ResponseType (type)
- Screen (class)
- screen (var)
- ScriptProcessorNode (class)
- SharedWorker (class)
- SharedWorkerGlobalScope (class)
- TextDecoder (class)
- TextEncoder (class)
- URLSearchParams (class)
- VRDisplay (class)
- VRDisplayCapabilities (type)
- VRDisplayEvent (class)
- VRDisplayEventInit (type)
- VRDisplayEventReason (type)
- VREye (type)
- VREyeParameters (type)
- VRFrameData (class)
- VRLayerInit (type)
- VRPose (type)
- VRSource (type)
- VRStageParameters (type)
- WaveShaperNode (class)
- WebSocket (class)
- window (var)
- Worker (class)
- WorkerGlobalScope (class)
- WorkerLocation (class)
- WorkerNavigator mixins NavigatorCommon (class)
- XDomainRequest (class)
- XMLHttpRequest (class)
- XMLHttpRequestEventTarget (class)
- XMLSerializer (class)
Browser Object Model (BOM) "private" types
CSS Object Model (CSSOM)
- CSSRule (class)
- CSSRuleList (class)
- CSSStyleDeclaration (class)
- CSSStyleSheet (class)
- MediaList (class)
- StyleSheet (class)
- StyleSheetList (class)
- TransitionEvent (class)
indexedDB
- IDBCursor (interface)
- IDBCursorWithValue (interface)
- IDBDatabase (interface)
- IDBDirection (type)
- IDBEnvironment (interface)
- IDBFactory (interface)
- IDBIndex (interface)
- IDBKeyRange (interface)
- IDBObjectStore (interface)
- IDBOpenDBRequest (interface)
- IDBRequest (interface)
- IDBTransaction (interface)
Node.js
- __dirname (var)
- __filename (var)
- assert (module)
- AssertionError (class)
- exports (var)
- buffer (module)
- INSPECT_MAX_BYTES (var)
- kMaxLength (var)
- Buffer (class)
- child_process (module)
- ChildProcess (var)
- cluster (module)
- crypto (module)
- DEFAULT_ENCODING (var)
- Sign (class)
- Verify (class)
- dgram (module)
- dns (module)
- ADDRGETNETWORKPARAMS (var)
- BADFAMILY (var)
- BADFLAGS (var)
- BADHINTS (var)
- BADNAME (var)
- BADQUERY (var)
- BADRESP (var)
- BADSTR (var)
- CANCELLED (var)
- CONNREFUSED (var)
- DESTRUCTION (var)
- EOF (var)
- FILE (var)
- FORMER (var)
- LOADIPHLPAPI (var)
- NODATA (var)
- NOMEM (var)
- NONAME (var)
- NOTFOUND (var)
- NOTIMP (var)
- NOTINITIALIZED (var)
- REFUSED (var)
- SERVFAIL (var)
- TIMEOUT (var)
- domain (module)
- duplexStreamOptions (type)
- events (module)
- EventEmitter (class)
- exports (var)
- fs (module)
- HeapSpaceStatistics (type)
- HeapStatistics (type)
- http (module)
- Agent (class)
- ClientRequest (class)
- IncomingMessage (class)
- METHODS (var)
- Server (class)
- ServerResponse (class)
- STATUS_CODES (var)
- https (module)
- Agent (class)
- ClientRequest (class)
- IncomingMessage (class)
- Server (class)
- ServerResponse (class)
- net (module)
- connectionListener (type)
- connectListener (type)
- Server (class)
- Socket (class)
- os (module)
- EOL (var)
- path (module)
- process (var)
- Process (class)
- punycode (module)
- querystring (module)
- readableStreamOptions (type)
- readline (module)
- Interface (var)
- repl (module)
- REPL_MODE_MAGIC (var)
- REPL_MODE_SLOPPY (var)
- REPL_MODE_STRICT (var)
- REPLServer (class)
- stream (module)
- Duplex (var)
- PassThrough (var)
- Readable (var)
- Transform (var)
- Writable (var)
- string_decoder (module)
- StringDecoder (var)
- tls (module)
- CLIENT_RENEG_LIMIT (var)
- CLIENT_RENEG_WINDOW (var)
- DEFAULT_CIPHERS (var)
- DEFAULT_ECDH_CURVE (var)
- SecureContext (var)
- Server (var)
- SLAB_BUFFER_SIZE (var)
- TLSSocket (var)
- tty (module)
- ReadStream (var)
- WriteStream (var)
- url (module)
- URL (class)
- URLSearchParams (class)
- util (module)
- v8 (module)
- vm (module)
- Script (var)
- writableStreamOptions (type)
- zlib (module)
- codes (var)
- deflate (var)
- Deflate (class)
- deflateRaw (var)
- DeflateRaw (class)
- deflateRawSync (var)
- deflateSync (var)
- gunzip (var)
- Gunzip (class)
- gunzipSync (var)
- gzip (var)
- Gzip (class)
- gzipSync (var)
- inflate (var)
- Inflate (class)
- inflateRaw (var)
- InflateRaw (class)
- inflateRawSync (var)
- inflateSync (var)
- unzip (var)
- Unzip (class)
- unzipSync (var)
- Z_ASCII (var)
- Z_BEST_COMPRESSION (var)
- Z_BEST_SPEED (var)
- Z_BINARY (var)
- Z_BLOCK (var)
- Z_BUF_ERROR (var)
- Z_DATA_ERROR (var)
- Z_DEFAULT_CHUNK (var)
- Z_DEFAULT_COMPRESSION (var)
- Z_DEFAULT_LEVEL (var)
- Z_DEFAULT_MEMLEVEL (var)
- Z_DEFAULT_STRATEGY (var)
- Z_DEFAULT_WINDOWBITS (var)
- Z_DEFLATED (var)
- Z_ERRNO (var)
- Z_FILTERED (var)
- Z_FINISH (var)
- Z_FIXED (var)
- Z_FULL_FLUSH (var)
- Z_HUFFMAN_ONLY (var)
- Z_MAX_CHUNK (var)
- Z_MAX_LEVEL (var)
- Z_MAX_MEMLEVEL (var)
- Z_MAX_WINDOWBITS (var)
- Z_MEM_ERROR (var)
- Z_MIN_CHUNK (var)
- Z_MIN_LEVEL (var)
- Z_MIN_MEMLEVEL (var)
- Z_MIN_WINDOWBITS (var)
- Z_NEED_DICT (var)
- Z_NO_COMPRESSION (var)
- Z_NO_FLUSH (var)
- Z_NULL (var)
- Z_OK (var)
- Z_PARTIAL_FLUSH (var)
- Z_RLE (var)
- Z_STREAM_END (var)
- Z_STREAM_ERROR (var)
- Z_SYNC_FLUSH (var)
- Z_TEXT (var)
- Z_TREES (var)
- Z_UNKNOWN (var)
- Z_VERSION_ERROR (var)
- Zlib (class)
Node.js "private" types
- $SymbolReplModeMagic mixins Symbol (class)
- $SymbolReplModeSloppy mixins Symbol (class)
- $SymbolReplModeStrict mixins Symbol (class)
- buffer$Encoding (type)
- buffer$NonBufferEncoding (type)
- buffer$ToJSONRet (type)
- child_process$ChildProcess (class)
- child_process$Error (class)
- child_process$execCallback (type)
- child_process$execFileCallback (type)
- child_process$execFileOpts (type)
- child_process$execFileSyncOpts (type)
- child_process$execOpts (type)
- child_process$execSyncOpts (type)
- child_process$forkOpts (type)
- child_process$Handle (type)
- child_process$spawnOpts (type)
- child_process$spawnRet (type)
- child_process$spawnSyncOpts (type)
- child_process$spawnSyncRet (type)
- cluster$setupMasterOpts (type)
- cluster$Worker (class)
- crypto$Cipher (class)
- crypto$createCredentialsDetails (type)
- crypto$Credentials (type)
- crypto$Decipher (class)
- crypto$DiffieHellman (type)
- crypto$Hash (class)
- crypto$Hmac (class)
- crypto$Sign (class)
- crypto$Sign$private_key (type)
- crypto$Verify (class)
- dgram$Socket (class)
- domain$Domain (class)
- events$EventEmitter (class)
- http$Agent (class)
- http$agentOptions (type)
- http$ClientRequest (class)
- http$IncomingMessage (class)
- http$ServerResponse (class)
- net$connectOptions (type)
- net$Server (class)
- net$Socket (class)
- net$Socket$address (type)
- os$CPU (type)
- os$NetIFAddr (type)
- os$UserInfo$buffer (type)
- os$UserInfo$string (type)
- readline$Interface (class)
- readline$InterfaceCompleter (type)
- repl$DefineCommandOptions (type)
- stream$Duplex (class)
- stream$PassThrough (class)
- stream$Readable (class)
- stream$Stream (class)
- stream$Transform (class)
- stream$Writable (class)
- string_decoder$StringDecoder (class)
- tls$Server (class)
- tls$TLSSocket (class)
- tty$ReadStream (class)
- tty$WriteStream (class)
- util$InspectOptions (type)
- vm$Context (class)
- vm$Script (class)
- vm$ScriptOptions (type)
- zlib$asyncFn (type)
- zlib$options (type)
- zlib$syncFn (type)
Service Workers
- Cache (class)
- CacheQueryOptions (type)
- caches (var)
- CacheStorage (class)
- Client (class)
- ClientQueryOptions (type)
- Clients (class)
- clients (var)
- ClientType (type)
- ExtendableEvent (class)
- FetchEvent (class)
- ForeignFetchOptions (type)
- FrameType (type)
- InstallEvent (class)
- NavigationPreloadManager (class)
- NavigationPreloadState (class)
- onactivate (var)
- onfetch (var)
- onforeignfetch (var)
- oninstall (var)
- onmessage (var)
- registration (var)
- RegistrationOptions (type)
- ServiceWorker (class)
- ServiceWorkerContainer (class)
- ServiceWorkerMessageEvent (class)
- ServiceWorkerRegistration (class)
- ServiceWorkerState (type)
- VisibilityState (type)
- WindowClient (class)
- WorkerType (type)
Streams
- PipeToOptions (type)
- QueuingStrategy (type)
- ReadableByteStreamController (class)
- ReadableStream (class)
- ReadableStreamBYOBRequest (class)
- ReadableStreamController (class)
- ReadableStreamReader (class)
- TextEncodeOptions (type)
- TextEncoder (class)
- TransformStream (class)
- UnderlyingSink (interface)
- UnderlyingSource (interface)
- WritableStream (class)
- WritableStreamController (interface)
- WritableStreamWriter (interface)