Repository navigation
v0.206.0
·
7311 commits
to main
since this release
Likely to cause new Flow errors:
React.Elementwill now accept a second type argument that specifies the props type. JSX will populate this type argument with actual props passed to component, instead of deriving it from the signature. The change will reveal some broken code, e.g. try-Flow example.$Shapeis deprecated, usePartialinstead. Read this blog post for more.- Add a (temporary) option
tuple_enhancementsto gate our tuple type enhancements (labeled tuple elements, which can be optional or have variance annotations), so we can show a Flow error rather than having users just get syntax errors from various other tooling (e.g. Prettier, ESLint), until all that tooling is updated. experimental.abstract_locationsis removed. Setting this config to true improves Flow's performance. The config defaults to true since 0.139.
New Features:
- Allow opaque types with
stringsupertypes to be used as keys in a dictionary, and have that opaque type be preserved when usingObject.keys. - To help people familiar with TS, error on and supply a quickfix to the Flow equivalent for the TS types:
Readonly,ReadonlyArray,ReadonlyMap,ReadonlySet,NonNullable.
Notable bug fixes:
- Error more consistently with
[invalid-computed-prop]errors. try-Flow. - Fixed cases where uses of
Partial/Requiredcaused errors to be positioned poorly.
Misc:
- To improve clarity of error messages we will display
mixedinstead of a generic type if that generic type has a default bound ofmixed. try-Flow. - Object property type incompatibility errors will now contain additional explanations when the error only arises due to object property invariant subtyping.