github facebook/flow v0.204.0

latest releases: v0.239.0, v0.238.3, v0.238.2...
14 months ago

Likely to cause new Flow errors:

  • Some heap refinements might be invalidated more aggressively, when method calls appear in conditionals. This brings us closer to what happens in the case of the regular function call. (Example)
  • Always error on the deprecated existential type *, it's just an alias for any

New Features:

  • Experimental support for Mapped Types like {[k in keyof T]: ?T[k]}! (Example). Look out for a blog post, documentation and support in other tools in the near future. You can try mapped types in your project by setting the experimental.mapped_type=true flag in the options section of your flowconfig.

Notable bug fixes:

  • Fix autocomplete for super members (e.g., super.|)
  • Fix hover type of JSX attribute names
  • Fix showing documentation in signature help for member expressions (e.g., o.m(|))
  • Fix unused-promise lint false positives for logical and conditional expressions
  • Fix spurious error in overloaded generic calls when a contextual type is available (Example)
  • Properly remove the : with inferred predicates in flow-remove-types

Parser:

  • Error on classes with static prototype fields
  • Fix missing parse error for class constructors that are async, generators or accessors. The former two were previously type errors rather than syntax errors.

Library Definitions:

  • Add NodeJS stream promises (thanks @moroine)

Don't miss a new flow release

NewReleases is sending notifications on new releases.