Repository navigation
v0.236.0
·
5633 commits
to main
since this release
Likely to cause new Flow errors:
- Ensure React class component constructors call
superwith 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.createElementtyping, and check whether the locally defined React has the rightReact.createElementdefinition. If you have some JSX that's already invalid, you might see different errors. example React$CreateClasstype, aliased to any since v0.176, is removed.- Fix typing of
isValidFlow 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
--tracesand the corresponding flowconfig option has been removed. React.createFactorylibdef 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
bigintproperty to match ESTree spec. Numeric separators are removed (_), and should contain only decimal digits.
IDE:
- Under
component_syntax=true, autocomplete will providecomponentandhookkeyword in appropriate places.
Library Definitions:
$asyncIterator, which is never a real global, is removed from global libdef.- We removed
$awaitin the libdef. If you are depending on it liketypeof $await, you can replace it with<T>(Promise<T> | T) => T.