v0.100.0
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, useReact$ComponentType
instead. Try Flow example - The
React$ComponentType
annotation is now strict when used with refs. Before, it was possible to pass aref
having any type when creating an element from a component using this type. If you need to describe components that accept refs, use theReact$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 forReact$Element<React$ElementType>
.
Misc:
- Add
decode
method 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