Likely to cause new Flow errors:
- Referencing
React$Component
directly will now be an error. - Use of
React$ComponentType
,React$Context
andReact$RefSetter
will now triggerinternal-type
errors.
New Features:
- Added types for JSX intrinsics, which will cause new errors and show autocomplete for DOM intrinsics like
div
Notable bug fixes:
- Replace incorrect definition for
ClientRect
andClientRectList
with aliases toDOMRect
andDOMRectList
This fixes the type definitions for the DOM APIs in Flow, but replacing an nonexistent globalsClientRect
andClientRectList
types with just an alias toDOMRect
andDOMRectList
. - fixed a bug that caused spurious errors on rest array assignments (e.g. try-Flow).
- When a library definition file has changed, Flow will no longer just stop the server. Instead, Flow will properly recheck everything, even under lazy mode.
- We now allow something of type
React.ComponentType<{}>
to be a subtype ofcomponent()
IDE:
- Component syntax components will now show up in document symbols
Library Definitions:
- Most of the bundled libdefs will no longer be maintained and shipped with Flow. Going forward, they should be downloaded from flow-typed. To maintain the same behavior as before, you should have a
flow-typed.config.json
in the root of your project with the following content:
{
"env": ["node", "dom", "bom", "intl", "cssom", "indexeddb", "serviceworkers", "webassembly"]
}