Skip to content

v0.100.0

Compare
Choose a tag to compare
@facebook-github-bot facebook-github-bot released this 31 May 01:10
· 9047 commits to main 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>.

Misc:

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

Parser:

  • 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