github facebook/flow v0.228.0

latest releases: v0.236.0, v0.235.1, v0.234.0...
3 months ago

Likely to cause new Flow errors:

  • Some new errors might be raised when using React.cloneElement with polymorphic components. Eg. try-Flow. Note that React.cloneElement is deprecated
  • Nested declare module is no longer a parser error, but a type checking error
  • declare module is now explicitly banned in nested scope and outside of library definition files. It already does nothing under those contexts.

New Features:

  • All kinds of imports are now supported in library definition files
  • We will no longer require annotations on class properties, if the class properties are already initialized with "annotation-like" expressions. e.g. We can now infer the type directly for properties like prop = (foo: string): number => 3.

Notable bug fixes:

  • Fixed a bug that causes the first run of flow check to always return 0 errors, when some parts of temporary directory is a symlink.
  • Hover type on react elements now show the type of the component and props, instead of just React$Element. (e.g. try-Flow)
  • For missing annotation on exports, we now correctly say some annotation is missing on an identifier instead of array pattern. e.g. for export function f(a) {}, we now say "Missing type annotation at identifier" instead of "Missing type annotation at array pattern".

Parser:

  • Flow can now parse declare namespace Foo {...} statements. The body of the declare namespace statement shares the same restrictions of declare module.
  • Invalid exports in declare module are no longer parse errors. They are now type checker errors.

Don't miss a new flow release

NewReleases is sending notifications on new releases.