Likely to cause new Flow errors:
- Ensure React class component constructors call
super
with a props object. example - Modified typing of
React.cloneElement
. You might see errors being shifted around, and some advanced patterns no longer supported. The API is not encouraged by React, so migrating away from it is recommended. - For JSX elements under
react.runtime=classic
, we now type check the JSX unconditionally using the rightReact.createElement
typing, and check whether the locally defined React has the rightReact.createElement
definition. If you have some JSX that's already invalid, you might see different errors. example React$CreateClass
type, aliased to any since v0.176, is removed.- Fix typing of
isValid
Flow Enums method, reverting back to behavior from before v0.232. - Support for
$CharSet
, an undocumented feature, has been removed.RegExp$flags
, which depends on$CharSet
, is also removed. In most cases, you should replace these types withstring
. - Support for
--traces
and the corresponding flowconfig option has been removed. React.createFactory
libdef is removed. This API is already deprecated and will be removed in React 19.
Notable bug fixes:
- Fixed interactions of various types with specialized versions of
mixed
(such as$NonMaybeType<mixed>
). (try-Flow examples)
Misc:
- Support removing
export type *
(ExportAllDeclaration) nodes withflow-remove-types
(thanks @jbroma!)
Parser:
- Updated bigint literal AST output for
bigint
property to match ESTree spec. Numeric separators are removed (_
), and should contain only decimal digits.
IDE:
- Under
component_syntax=true
, autocomplete will providecomponent
andhook
keyword in appropriate places.
Library Definitions:
$asyncIterator
, which is never a real global, is removed from global libdef.- We removed
$await
in the libdef. If you are depending on it liketypeof $await
, you can replace it with<T>(Promise<T> | T) => T
.