Breaking Changes:
- Support for the
casting_syntax=colonis removed. This means that the as casting syntax is always enabled. experimental.error_code_migrationconfig option is removed. In the previously version, the only allowed value wasnew.
Likely to cause new Flow errors:
- We have fixed more source of object literal unsoundness. More errors will be exposed. (example)
- For most of the common invariant subtyping errors (arrays, objects with mutable fields), we will now emit a single subtyping error with explanation how to fix. Error locations might change. See https://flow.org/en/docs/lang/variance/#toc-invariance to learn more about variance of types
- Suppressions without error code will now be an error instead of a warning.
- Suppressions without error code will no longer apply. You can download and use this script to automatically migrate most of the suppressions.
- Only
$FlowFixMeand$FlowExpectedErrorare supported suppression comments. Existing$FlowIgnoreand$FlowIssuewill no longer suppress anything.
New Features:
- Added a Flow lint
require-explicit-enum-checkswhich works likerequire-explicit-enum-switch-casesbut formatch.
Notable bug fixes:
- Various codemods will now insert parentheses around expressions in class extends if they are changed. Previously, it might result in invalid code like
class Foo extends myExpr() as Bar - Fixes an inconsistency in recording the this-type guard on a regular (non-
declare) method in the same vs different files.
IDE:
- Added a quickfix to convert type to value imports on type-as-value errors.