Likely to cause new Flow errors:
- Flow now detects sketchy null errors that arise via optional chaining, and which involve opaque types, type aliases, or generics.
- Fixed an issue that caused us to previously miss some errors when the type involved was an intersection.
New Features:
- Access from a union of exact objects, on a property that is on one but not all of the objects, now results in the type of that property or
void, instead of an error. - Add type checking support for logical assignment operators.
Notable bug fixes:
- Fix a crash when using the default file watcher (dfind) on Windows if an [include] directory doesn't exist.
- Do not attempt to unify the type of a
declarefunction that comes after a function declaration of the same name (try-Flow). - Improve wording of class-extends errors (try-Flow).
- Don't report
this-in-exported-functionfor functions with athisparameter.
Misc:
- Added
--list-filesflag tostatusandcheckcommands. This will dump a list of files that contain errors instead of the error messages. - The default file watcher (dfind) now logs to a
.dfind_logfile alongside the.logand.monitor_logfiles. - Changed the way Flow computes coverage for type parameters with uncovered upper bounds. Previously, a type parameter was always considered covered when it appeared in a function signature, class declaration, or type alias, even if the type parameter's upper bound was
any. With this change, such type parameters are now considered to be uncovered. This results in Flow now computing a lower coverage percentage on modules where this pattern is present or that import types from other modules that use this pattern.