NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3376 most downloaded on npm
JavaScript parser written in OCaml. Produces ESTree AST
Last release 2 days ago
02 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
435 releases · first in 2015
Likely to cause new Flow errors:
Likely to cause new Flow errors:
Number, String, RegExp, Date, native errors, maps, and sets now use TypeScript-style instance and constructor interfaces, while Math, JSON, and Atomics use named interfaces. Existing code relying on their previous class or object typing may produce new errors.New Features:
Notable bug fixes:
Parser:
One column per quarter.
Likely to cause new Flow errors:
Likely to cause new Flow errors:
react module will always resolve to Flow's builtin react type definitions. If you use a custom react typing module, you might see errors.Notable bug fixes:
unique symbol types and signed mapped-property variance.Parser:
ImportType ESTree field from argument to source.Library Definitions:
lib.dom.d.ts by default. If your project is not supposed to run in the browser, you can switch back to the old behavior with builtin_lib=core-only in flowconfig's [options] section.Iterable and ArrayLike type now align with those from TypeScript. You might see errors when your existing code assumes the old typing.no_flowlib option is removed. Use builtin_lib=flowlib (default) or builtin_lib=prelude instead.
Breaking Changes:
no_flowlib option is removed. Use builtin_lib=flowlib (default) or builtin_lib=prelude instead.Likely to cause new Flow errors:
React.MixedElement otherwise. Legacy code that requires exact react element will see new errors.New Features:
Symbol() and Symbol.for() create a unique symbol when they initialize a const, so symbols can be used as property keys without explicit declarations.Notable bug fixes:
import typeof of a generic value without type arguments keeps its polymorphism instead of reporting missing-type-args, and renders accepts import typeof of a generic component.Parser:
import defer * as ns from "m" and import.defer("m") now set the ESTree phase property to "defer".IDE:
super shows the declarationLibrary Definitions:
import.meta will no longer have url property and arbitrary unknown property. To add them back, you can do so through declaration merging (e.g. adding interface ImportMeta { url: string } to your global library definitions.ArrayLike and ArrayBuffer now follow TypeScript definitionsArray(length) and Array(items)Likely to cause new Flow errors:
Likely to cause new Flow errors:
method-unbinding errors and instead perform stricter this-type checking (example).IDE:
type-at-pos and hoverLibrary Definitions:
React.ReactElement now matches latest type in @types/react. Added missing React.JSX.Element that makes the type in @types/react .Likely to cause new Flow errors:
Likely to cause new Flow errors:
.call/apply/bind calls. Only expressions of the form <expr>.m.call(<expr>, ...), <expr>.m.apply(<expr>, ...) and <expr>.m.bind(<expr>, ...) are allowed.[untyped] section of flowconfig will use the glob system. See https://flow.org/en/docs/config/untyped/Notable bug fixes:
Likely to cause new Flow errors:
.call/apply/bind calls. Only expressions of the form <expr>.m.call(<expr>, ...), <expr>.m.apply(<expr>, ...) and <expr>.m.bind(<expr>, ...) are allowed.[untyped] section of flowconfig will use the glob system. See https://flow.org/en/docs/config/untyped/Notable bug fixes:
instanceof refinement of constructor objects.Partial no longer strip readonly-ness of dictionaries. (example)Likely to cause new Flow errors:
Likely to cause new Flow errors:
unique symbol annotation is now an error unless it is the type of a const variable, of a readonly object type or interface property, or of a static readonly class field.New Features:
flow-parser and flow-eslint packages that are drop-in replacement for hermes-parser and hermes-eslint. Babel docs and ESLint docs have been updated.declare class imported from another module, can be keyed by a unique symbol.Notable bug fixes:
keyof over a symbol index signature is now symbol rather than string.x !== undefined no longer stops refining after a call that passes undefined as an argument: (e.g. try-Flow)Library Definitions:
Symbol are typed as unique symbol, and Symbol.metadata is now available.[include] and [ignore] sections in flowconfig should use globs instead. Read https://flow.org/en/docs/config/include/ and https://flow.org/en/docs/con
Breaking changes:
[include] and [ignore] sections in flowconfig should use globs instead. Read https://flow.org/en/docs/config/include/ and https://flow.org/en/docs/config/ignore/ for more information.New Features:
this type guards can now be used on non-static methods of regular classes, not just declare class and interface methods. The method body is checked for consistency against the guard type.Notable bug fixes:
Library Definitions:
WeakMap keysIn an object type, a bracketed key written as a string or number literal, or as the name of a value, is now a computed key naming a single property ra
New Features:
[label: K] keeps index-signature semantics. Breaking: a key headed by a value binding is read as a computed key. Thus a class or enum key such as {[C]: V} is now an error, and a qualified type exposed through a class/namespace merge, as in {[C.K]: V}, must use the labeled form {[key: C.K]: V} to remain an index signature.declare class body, a bracketed key written as a string or number literal, or as the name of a value, is now a computed key naming a single property rather than an index signature, so several such keys can coexist, and static puts the property on the static side. A key written as a type-only name is unchanged, and the labeled form [label: K] keeps index-signature semantics. Breaking: a key headed by a value binding is read as a computed key, so a class or enum key such as interface I {[C]: V} is now an error and must use [key: C] to remain an index signature.[expr](): T that resolves to a single literal string or safe-integer number is now accepted in interface, declare class, and object type bodies (previously a parse error outside .d.ts files) and reads as a named method.arr['map'] or arr[Symbol.iterator]) now reads the corresponding named member instead of erroring that the key is not an array index, and a string key holding a safe integer (arr['0']) indexes the array like the equivalent numeric key.Notable bug fixes:
keyof any now evaluates to any as expected. Spurious errors related to the bug will no longer fire.Parser:
component and hook type annotations as the declaration of declare export defaultLibrary Definitions:
The following flags are removed since they no longer change anything
Breaking changes:
experimental.channel_modeexperimental.channel_mode.windowsexperimental.long_lived_workersexperimental.long_lived_workers.windowsgc.worker.custom_major_ratiogc.worker.custom_minor_max_sizegc.worker.custom_minor_ratiogc.worker.major_heap_incrementgc.worker.minor_heap_sizegc.worker.space_overheadgc.worker.window_sizesharedmemory.hash_table_powsharedmemory.heap_sizeLikely to cause new Flow errors:
No behavioral changes in this release
No behavioral changes in this release
.flowconfig's [include] and [ignore] sections can now be configured using globs, in addition to the current regex based system. Right now, glob items
New Features:
[include] and [ignore] sections can now be configured using globs, in addition to the current regex based system. Right now, glob items must be specified with glob: prefix. Globs do not support <PROJECT_ROOT>, since they are assumed to start from the project root.No behavioral changes in this release
No behavioral changes in this release
Fixed a crash in pattern matching. ( example )
Notable bug fixes:
instanceof no longer leaks any from members that cannot match the guard (e.g. Foo<string> | Bar<number> refined by instanceof Foo now yields Foo<string> instead of Foo<string> | Foo<any>). This may surface real errors that were previously masked.Notable bug fixes:
instanceof no longer leaks any from members that cannot match the guard (e.g. Foo<string> | Bar<number> refined by instanceof Foo now yields Foo<string> instead of Foo<string> | Foo<any>). This may surface real errors that were previously masked.flow-parser is now backed by the Rust port parser. It will have public API similar to that of hermes-parser .
Parser:
flow-parser is now backed by the Rust port parser. It will have public API similar to that of hermes-parser.Likely to cause new Flow errors:
Likely to cause new Flow errors:
Partial, Required, Readonly, Pick, and Omit. ExampleLikely to cause new Flow errors:
Likely to cause new Flow errors:
casting_syntax is removed. The as casting syntax is the only supported casting syntax. See Modernizing legacy syntax for migration guidance.T: B in favor of T extends B in type parameters, and error on +/- in favor of readonly/writeonly . See Modernizing legacy syntax for migration guidance.New Features:
NaN as a match patternNotable bug fixes:
match being treated as their positive counterpartConstructorParameters and InstanceType now work on Class<C>, not just typeof Cmatch instance patterns whose constructor is a subclass of the scrutinee type are no longer incorrectly reported as unused.Flow will now error on all deprecated utility types. See Modernizing legacy syntax for migration guidance.
Likely to cause new Flow errors:
Allow -? (optionality removal) in mapped types.
New Features:
-? (optionality removal) in mapped types.ConstructorParameters and InstanceTypeMisc:
.flowconfig options component_syntax, enums, and pattern_matching now default to true. To keep the previous behavior, set the corresponding option to =false in your .flowconfig.deprecated-type and deprecated-type-bool errors are now always on (the lints were on by default already). Update any references of the type bool to bo…
Likely to cause new Flow errors:
deprecated-type and deprecated-type-bool errors are now always on (the lints were on by default already). Update any references of the type bool to boolean, and delete references to the lints in your .flowconfig and flowlint comments — the setting is a no-op for this release and will be removed in a future release.The deprecated variance sigils error message now suggests the contextually correct keyword (readonly/writeonly for property positions, out/in for type…
readonly, writeonly, in, out) on type parameters and object/class properties are now enabled by default. The experimental.allow_variance_keywords is no longer needed to opt in.readonly/writeonly for property positions, out/in for type parameter positions) instead of listing both alternatives.Deleted the implicit-inexact-object lint, it no longer does anything since exact_by_default=false was deprecated.
Likely to cause new Flow errors:
implicit-inexact-object lint, it no longer does anything since exact_by_default=false was deprecated.exact_by_default=false is now deprecated in .flowconfig. Read this blog post on how to migrate, and our docs on objects for more. exact_by_default=true is the default (since 2023) so simply delete the option when migrating.Notable bug fixes:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
(x: T) to x as T. The default value of the option casting_syntax is now as, and Flow will error on the old syntax. If you want to preserve the old defualt value, add casting_syntax=both to your .flowconfig. You can use the npm package flow-upgrade to upgade: yarn run flow-codemod typeCastToAsExpression. Read the docs for more.New Features:
void is used if omittedParser:
ArrayExpression gains a trailingComma field, optional chaining is wrapped in a ChainExpression, AssertNonnull (expr!) emits a NonNullExpression instead of an optional node, type-position this emits ThisTypeAnnotation, and TypeParameter.bound is now a bare type node without the TypeAnnotation wrapper.Fix in saved state checks after a rebase
Likely to cause new Flow errors:
Likely to cause new Flow errors:
+T, -T, in T, out T) on interface method type parameters, matching the existing rejection on class methods and function typesNew Features:
declare class and interface of the same name in the same scope.const A = 1; interface A {} is now accepted.Added support for string and number literal properties in declare class and interface
New Features:
declare class and interfaceLibrary Definitions:
Record<K, T> utility type's key bound from K: string to K: PropertyKey, allowing number and symbol keys in addition to stringMisc:
experimental.allow_variance_keywords is set to true, we support the keywords in / out / readonly along with +/- for varianceNew Features:
declare class and interfaceLibrary Definitions:
Record<K, T> utility type's key bound from K: string to K: PropertyKey, allowing number and symbol keys in addition to stringParser:
writeonly property variance keywordMisc:
experimental.allow_variance_keywords is set to true, we support the keywords in / out / readonly / writeonly along with +/- for varianceSupport constructor type signatures (new (...) => Type) in interfaces and declare class
New Features:
new (...) => Type) in interfaces and declare classMisc:
allow_variance_keywords is set to true, Flow stops erroring for in / out / readonlyNo significant changes.
No significant changes.
The 5 enum body ESTree node types (EnumBooleanBody, EnumNumberBody, EnumStringBody, EnumSymbolBody, EnumBigIntBody) have been replaced with a single E
Parser:
EnumBooleanBody, EnumNumberBody, EnumStringBody, EnumSymbolBody, EnumBigIntBody) have been replaced with a single EnumBody node. Its members property is a flat array of per-type member nodes (EnumBooleanMember, EnumNumberMember, EnumStringMember, EnumBigIntMember, EnumDefaultedMember). The explicitType property is now a string ("boolean", "number", "string", "symbol", "bigint") or null (previously a boolean). hasUnknownMembers remains a boolean. Several enum validation errors are no longer reported by the parser and are instead reported by the type checker.Library Definitions:
RegExp.escape()Misc: Store exports index in saved state
Support numeric literal object keys when importing/exporting object literals
Notable bug fixes:
infer to appear as member names in qualified type access (e.g. type S = O.infer;).readonly, keyof, infer, etc.) as function type parameter namesParser:
? optional modifier in various places this does not make sense, e.g. const x? = 1;Misc:
flow check becomes an alias of flow status. You can use flow full-check to trigger a full foreground check of a Flow root.Fix in Meta-internal saved state logic
Support for using well-known symbols as property names in types - the form should be exactly Symbol.iterator.
New Features:
Symbol.iterator.Notable bug fixes:
Library Definitions:
Fix in saved state on projects including files outside the project root.
Add autofix for colon-style type parameter bounds to extends-style type parameter bounds
Misc:
Fixed analysis of number literal keys in object destructuring rest type computation
Notable bug fixes:
Adds a new stylex_shorthand_prop flowconfig option that enables syntactic sugar for StyleX on lowercase (intrinsic) JSX elements. When set to a prop n
New Features:
stylex_shorthand_prop flowconfig option that enables syntactic sugar for StyleX on lowercase (intrinsic) JSX elements. When set to a prop name (e.g. stylex_shorthand_prop=sx), <div sx={[styles.foo, styles.bar]} /> desugars to <div {...stylex.props(styles.foo, styles.bar)} />.Fix https://github.com/facebook/flow/issues/9357
Notable bug fixes:
Misc:
IDE:
For React autoimport, it will now always be in the form of import * as React from 'react'
IDE:
React autoimport, it will now always be in the form of import * as React from 'react'Minor changes to the flow-upgrade script
Misc:
Support export declare, like declare export
Parser:
export declare, like declare exportcomponent in implicit declare context, the ast we produce will include implicitDeclare: trueLikely to cause new Flow errors:
Likely to cause new Flow errors:
Parser:
filename in the option objectdeclare keyword can be omitted for declare function under declaration context (.flow file, declare module, declare namespace)
New Features:
declare keyword can be omitted for declare function under declaration context (.flow file, declare module, declare namespace)Fix parsing of experimental record expressions that are multiline
Parser:
The declare keyword can be omitted for declare const/let/var variable: type and declare component under a declaration context (libdef file, .js.flow f
Declarations:
declare keyword can be omitted for declare const/let/var variable: type and declare component under a declaration context (libdef file, .js.flow file, declare module, declare namespace)declare component now requires the rest props to be named - matching normal component declarationsMisc:
Omit<O, K> utility type will no longer enforce that the provided keys K need to be part of OSupport 4 well-known symbols (Symbol.iterator, Symbol.asyncIterator, Symbol.dispose, Symbol.asyncDispose) in class methods. For now, the computed meth
New Features:
Symbol.iterator, Symbol.asyncIterator, Symbol.dispose, Symbol.asyncDispose) in class methods. For now, the computed method name needs to be exactly in the form of Symbol.iterator (or other 3 names) to be recognized.Notable bug fixes:
Misc:
yarn run flow-codemod convertLegacyUtilityTypes)Parser:
Support second argument of import expressions
Parser:
Bug Fixes:
use_mixed_in_catch_variables option was renamed use_unknown_in_catch_variables because mixed is being renamed to unknown
Config:
use_mixed_in_catch_variables option was renamed use_unknown_in_catch_variables because mixed is being renamed to unknownLikely to cause new Flow errors:
Likely to cause new Flow errors:
Parser:
Flow now provides a code action to fix all invalid-type-cast-syntax errors in the file.
IDE:
invalid-type-cast-syntax errors in the file.Likely to cause new Flow errors:
Likely to cause new Flow errors:
type O_loop = { p: 0, __proto__: O_loop } will cause an error.Notable bug fixes:
import { | } from 'a'; will only suggest values, not types.IDE:
Library Definitions:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
$NonMaybeType, NonNullable, $ReadOnly, Readonly, $Keys, $Values, Values, $ReadOnlyMap, ReadonlyMap, $ReadOnlySet, ReadonlySet.Notable bug fixes:
StringPrefix/StringSuffix to be included in object initializers with other non-overlapping keys (example try-Flow)Library Definitions:
act: 19.0: https://react.dev/reference/react/actcaptureOwnerStack: 19.1: See https://react.dev/reference/react/captureOwnerStackuseEffectEvent: 19.2: https://react.dev/reference/react/useEffectEvent<Activity />: 19.2: See https://react.dev/reference/react/Activity
UpdateduseDeferredValue: 19.0: Accepts a second argument for initial valueuseTransition: 19.0: Accepts an async action functionstartTransition: 19.0: Accepts an async action functionLikely to cause new Flow errors:
Likely to cause new Flow errors:
React.ElementProps is removed. You should use React.ElementConfig instead.react-rule-hook-non-hook-syntax errors. To fix, annotate them with hook annotation. exampleReact$RefSetter<...> and and React$Context are removed. It continues to be available in the form of React.RefSetter<...> and React.Context<...>, regardless of whether you have imported React.React$ElementRef<...> was removed. It continues to be available in the form of React.ElementRef<...>, regardless of whether you have imported React.Breaking Changes:
max_literal_length was removed. Flow will always decide whether to infer a specific or general type of string literal based on the natural inference algorithm.Notable bug fixes:
@@dispose and @@asyncDispose in your library typings. You can access the respective properties with obj[Symbol.dispose] and obj[Symbol.asyncDispose].Library Definitions:
ExactReactElement will be populated by React.ElementConfig<C> instead of React.ElementProps<C>. Most of the code that doesn't depend on exact react element types won't be affected.The deprecated React$Element type is now removed. You should use React.Node or React.MixedElement in most cases. If you really want exact react elemen…
Breaking Changes:
hermes-parser package, which is running on wasm.Likely to cause new Flow errors:
React$Element type is now removed. You should use React.Node or React.MixedElement in most cases. If you really want exact react elements, you can use ExactReactElement_DEPRECATEDNew Features:
IDE:
Starting from this version, flow-bin will only contain ARM64 binaries for macOS.
Breaking Changes:
flow-bin will only contain ARM64 binaries for macOS.Likely to cause new Flow errors:
React.ElementConfig<...> and React.PropsOf<...> will now always include the ref prop in the props object type.react.ref_as_prop=partial_support is removed, and Flow now has better support for React 19's ref-as-prop behavior:
declare function id<Props: {...}, Ref>(c: component(ref?: Ref, ...Props)): component(ref?: Ref...Props)
now it must be written as
declare function id<Props: {...}>(c: component(...Props)): component(...Props)
Fix type of useActionState hook in React. Type should be Awaited instead of Promise (the opposite operation).
Library Definitions:
useActionState hook in React. Type should be Awaited instead of Promise (the opposite operation).Object.groupBy and Map.groupBy
Bug fixes:
experimental.ts_utility_syntax=true, imported Readonly, ReadonlyArray, NonNullable, ReadonlyMap, ReadonlySet types are considered any.Likely to cause new Flow errors:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
// $FlowFixMe[incompatible will now cause an error on the suppressionLikely to cause new Flow errors:
Likely to cause new Flow errors:
Notable bug fixes:
<X>(x: X, y: typeof x): TIDE:
Library Definitions:
Array.find can now return a more precise value if the predicate is inferred to be a type guard. exampleSupport for the casting_syntax=colon is removed. This means that the as casting syntax is always enabled.
Breaking Changes:
casting_syntax=colon is removed. This means that the as casting syntax is always enabled.experimental.error_code_migration config option is removed. In the previously version, the only allowed value was new.Likely to cause new Flow errors:
$FlowFixMe and $FlowExpectedError are supported suppression comments. Existing $FlowIgnore and $FlowIssue will no longer suppress anything.New Features:
require-explicit-enum-checks which works like require-explicit-enum-switch-cases but for match.Notable bug fixes:
class Foo extends myExpr() as Bardeclare) method in the same vs different files.IDE:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
missing-export error instead of prop-missing error. (example)suppress_type $FlowFixMe is now just a type alias of any. For most of the code, there will be no functional differences. However, you might see new errors if you have any local definitions of $FlowFixMe, or you used the undocumented $FlowFixMe<arbitrary type arguments>.suppress_type config has been removed. The only supported supress_type now is $FlowFixMe. If you want other variants, you can addtype MySuppressType = any
in your global library definitions.
incompatible-type, so some previously suppressed errors will reappear until you change the suppression error code into incompatible-type. The change was announced in the previous version, with option to enable it via experimental.error_code_migration=new. Now the only valid option to experimental.error_code_migration is new. You can run flow codemod error-code-migration --write . with the previous version of Flow to help migrate, since the codemod is removed in this version.Your coding agent can read these notes before it upgrades. Set up the MCP server →