Likely to cause new Flow errors:
$Partialhas been renamed toPartial, use the latter instead. Read the blog post for more details.- Support for
inference_modeconfig and related infra such as codemods were removed. You should follow the instructions in the Local Type Inference for Flow blog post to switch to use LTI before upgrading if you haven't already done so. - We replaced the implementation which checks nested
$Calland$ObjMapduring the check of a polymorphic function call. As a result, more underconstrained errors or type incompatibility errors might appear. - Removed the
sharedmemory.log_levelflowconfig option and the--sharedmemory-log-levelcommand line option.
IDE:
- Implement linked editing for JSX elements.
- Added code actions for adding/removing braces from arrow functions.
- Adds a quick fix from the deprecated
$PartialtoPartial.
Notable bug fixes:
- Fixed a bug that caused instances of nested utility types to be considered equivalent to
empty. e.g. try Flow example. - Make Flow's behavior more consistent by not erroring on
.constructoraccesses. e.g. try Flow example. - Fixed the file watcher not reacting to any changes on Windows.
- Improve the error messages when
underconstrained-implicit-instantiationerrors are raised in overloaded function calls. e.g. try Flow example - We now propagate
anyto instance types' type arguments. As a result, some spurious errors under LTI might be fixed (e.g. try Flow example), and some new errors might be revealed. - Fixed the hover type result when an enum object type appears nested in another type structure. e.g. try Flow example.
- Fixed the hover type on certain kinds of union types. e.g. try Flow example.
- Fixed the hover type on class constructors.
Misc:
- Try Flow's behavior can now be configured.
Parser:
- Leading
(,&and|are now included in intersection and union ranges, respectively. - Improve error recovery for mismatched JSX tags.
Library Definitions:
- Change
setStatein React lib defs to use$ReadOnly<Partial<T>>instead of$Shape<T>. - Make
$ReadOnlySetentry type covariant. - Expand the
Performancetyping with theeventCountsproperty, according to the W3C standard. - Adjust the type definitions of the
markandmeasureproperties onPerformanceinterface according to the W3C standard.