Likely to cause new Flow errors:
- The
React$ElementTypeannotation, 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, useReact$ComponentTypeinstead. Try Flow example - The
React$ComponentTypeannotation is now strict when used with refs. Before, it was possible to pass arefhaving any type when creating an element from a component using this type. If you need to describe components that accept refs, use theReact$AbstractComponenttype instead. Try Flow example - The
$Enumbuilt-in type annotation is now deprecated. Please use the semantically equivalent$Keystype 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$MixedElementas the sound superclass of all React elements. This is a type alias forReact$Element<React$ElementType>.
Misc:
- Add
decodemethod toHTMLImageElement(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