Skip to content

@facebook-github-bot facebook-github-bot released this May 31, 2019 · 254 commits to master since this release

Likely to cause new Flow errors:

  • The React$ElementType annotation, which was previously unsafe, is now strict. Before you could create an element given a component with this type using arbitrary props. To annotate any component that accepts some given props, use React$ComponentType instead. Try Flow example
  • The React$ComponentType annotation is now strict when used with refs. Before, it was possible to pass a ref having any type when creating an element from a component using this type. If you need to describe components that accept refs, use the React$AbstractComponent type instead. Try Flow example
  • The $Enum built-in type annotation is now deprecated. Please use the semantically equivalent $Keys type instead.
  • Destructuring patterns could previously include missing properties if the resulting binding was unused. This is now an error even when unused. Try Flow example

New Features:

  • You can now use the built-in type React$MixedElement as the sound superclass of all React elements. This is a type alias for React$Element<React$ElementType>.


  • Add decode method to HTMLImageElement (thanks, @vicapow!)


  • Handle NonOctalDecimalIntegerLiteral
  • Remove U+180e (Mongolian vowel separator) from list of valid whitespace code points
  • Remove support for legacy octal literals with numeric separators
  • Remove support for legacy octal bigints
  • Fix various issues related to automatic semicolon insertion (ASI) for class properties
Assets 7
You can’t perform that action at this time.