Likely to cause new Flow errors:
React.Element
type, deprecated in 0.243.0, is now removed.- Fixed a bug where refinements are incorrectly not invalidated. example
- Under custom jsx pragma, children is no longer incorrectly added to props. Some spurious errors will be gone. example
New Features:
- Added LSP signature help support for JSX attributes. The feature is triggered with the opening
{
of a JSX attribute value. - Flow now allows to configure the typing of jsx creation under the new option
react.custom_jsx_typing=true
. Under this flag, Flow will type check jsx by through your self-defined global typeReact$CustomJSXFactory
type, which should be a function type that accepts arguments according to jsx spec. e.g. You can write a loose one liketype React$CustomJSXFactory = (component: any, props: any, ...children: any) => React.MixedElement
Notable bug fixes:
- Fixed jsdoc attachment to signature help results for overloaded functions. (example)
- Signature help on overloaded functions will show information in the correct order of signatures
- Labels of autocomplete on members will indicate if the property is optional with a "?"
- Fixed a bug where a type-only namespace within a namespace is accidentally dropped. This bug used to make
globalThis.React.Node
being incorrectly unavailable. - Fixed poor interaction of "Add missing attributes" quickfix when Linked Editing Range is enabled.
- Clicking on related symbol location on hover will jump to the right location in VSCode. Previously it incorrectly jumped to the position 1 character left of the right location.
IDE:
- Elements of component syntax components (e.g. typeof
<A />
where A is in component syntax) will no longer be shown in hover with shorthand syntax likeA
. Instead, it will be shown asReact$Element<typeof A>