Likely to cause new Flow errors:
- Flow will now error on unsupported statements in library definitions, instead of silently ignoring them.
- Flow will error more consistently when variables of type any and empty are used as types (e.g. try-Flow)
IDE:
- Get definition request will now consistently jump to the name of the definition for ES module exports.
- In find local references, if a reference appears in a named import, it will no longer highlight the entire import as reference. Instead, it will only highlight the relevant name.
Notable bug fixes:
- Parameter types can now refer to previous parameters in the same parameter list (e.g.
function f(x: number, y: typeof x) {}
) - Report error when a function parameter is redeclared in its body in functions that have default params (e.g. try-Flow)
- For all declared names (declare class/var/let/const), we will allow full forward reference. All reads of these values will be considered to be initialized.
Misc:
- Changed React.Element to support a second type argument, as supported by React$Element
Library Definitions:
- Updated dom libdefs to allow Trusted Type objects