v0.39.0

@flow-bot flow-bot released this Feb 10, 2017

Likely to cause new Flow errors:

  • Previous usage of ReactElement<*> as a return type for render functions in React may now cause new errors now that a type propogation bug has been fixed. The general solution for this is to remove the return type for functions that return a React element (return types can be inferred by Flow, and Flow has never had a good way to express the type of a specific React element)
  • Several significant improvements to the locations Flow points to in error messages about objects and property accesses may move errors that were previously suppressed with a suppression comment to a new location

New Features:

  • You can now pass --no-suppressions to flow check in order to see what errors would show up in your codebase if you deleted all the error suppressions
  • New advanced debugging feature: You can now use the special $Flow$DebugPrint type to make Flow print a JSON representation of a type. Example usage: declare var flowDebug: $Flow$DebugPrint; flowDebug(someVariable);
  • Flow now supports constant-folding of tuple types. In general this means that Flow can now better understand rest elements and array-spreads when tuples are involved.
  • Flow now supports spreading types that are iterable (other than just Arrays)

Notable bug fixes:

Parser:

Misc:

  • A few improvements to error messages relating to React PropTypes
  • Various core libdef updates

Downloads