github facebook/flow v0.217.0

latest releases: v0.246.0, v0.245.2, v0.245.1...
12 months ago

Likely to cause new Flow errors:

  • Flow will now ban variance annotations in function or function type parameters. example
  • React.Element is now opaque, but we still expose some of its internal structure via the bound on the opaque type. You should not depend on the internal structure. In a future release, we plan to make React.Element truly opaque.
  • Fixed an issue with implicit instantiation in operations over unions that caused many errors to be missed.
  • Changed the ref params on forwardRef and useImperativeHandle to be write-only. Patterns that rely on refining these params to an object and reading the ref field are misusing these APIs. example
  • React.ElementProps is now more precise when applied to AbstractComponents, resulting in the config type of the component rather than mixed. This will cause errors when elements of components with different props are passed into React.Element<> types.

Parser:

  • We now parse type arguments after typeof annotations. e.g. typeof MyGenericClass<string, number>. Type checking for this syntax is still not supported.

Library Definitions:

  • Update URLSearchParams definitions (thanks @pascalduez).
  • Update AbortSignal definitions (thanks @pascalduez).
  • Add Array copying methods (toReversed, toSorted, toSpliced and with) the $ReadOnlyArray class definitions (thanks @pascalduez).

Don't miss a new flow release

NewReleases is sending notifications on new releases.