Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
Likely to cause new Flow errors:
- New errors may arise from generic definitions which lack the necessary annotations. Flow does not infer generic types, and the types it used to infer in their place occasionally masked errors. The types it now infers are still not generic, but will mask fewer errors.
- Fixed bug in union type checking which caused Flow to miss some errors when used in conjunction with generics and certain utility types.
- Improvements to constraints involving
anymay result in new errors.
type-at-poscan reconstruct spread objects when evaluation of the spread is not possible.
type-at-posnow supports implicit instantiation with
- Added core types
$ReadOnlyWeakSet. These types and their mutable counterparts mostly follow the pattern of
Array: the read-only parent class provides non-mutating methods, and the usual mutable class extends it. Unlike
$ReadOnlyArray, the new types are invariant in their type parameters.
- Added the
- Added the
flowtestis a CLI tool for running tests on Flow types.
- Added the
Notable bug fixes:
- Restructured file signatures to support overloading in exports.
- Allow named exports in exact
- Fixed forward references for
- Various bug fixes to the type normalizer and to
flow suggestno longer outputs
- Imported symbols should no longer appear
- Improved the way the element type of an array is determined.
- Various improvements to the AST differ.
WeakMapkeys must now be objects.
- Improved profiling for error collation and formatting.
- When a union lower bound flows into a union upper bound, if both unions are enums, we use the underlying set representation to handle this in O(n log n) time instead of quadratic time.
- The type normalizer properly represents utility types instead of treating them as generics.
- The type normalizer provides more accurate information about generics.
- Flowing a string lower bound into a union upper bound occurs in O(log n) instead of O(n) when the union is an enum.
- CJS modules' namespace objects are now treated as covariant.
- The type normalizer reconstructs literal types more precisely when
preserve_inferred_literal_typesis set. This does not change the behavior of
- Deleted the
- Removed the deprecated
Functionnodes in the AST.
- Enabled some tail call optimizations in
flow_parser.jswhich should cause it to stack overflow in fewer cases.
- The layout generator no longer prints empty statements as
;in pretty mode.
- Allow anonymous function parameter types inside generics inside arrow function return types. For example, we disallow
var x = (): (string) => number => 123because the first
=>is ambiguous. However,
var x = (): T<(string) => number> => 123is not ambiguous and we no longer disallow it.