Skip to content

v0.236.0

Compare
Choose a tag to compare
@facebook-github-bot facebook-github-bot released this 09 May 20:10
· 93 commits to main since this release

Likely to cause new Flow errors:

  • Ensure React class component constructors call super with a props object. example
  • Modified typing of React.cloneElement. You might see errors being shifted around, and some advanced patterns no longer supported. The API is not encouraged by React, so migrating away from it is recommended.
  • For JSX elements under react.runtime=classic, we now type check the JSX unconditionally using the right React.createElement typing, and check whether the locally defined React has the right React.createElement definition. If you have some JSX that's already invalid, you might see different errors. example
  • React$CreateClass type, aliased to any since v0.176, is removed.
  • Fix typing of isValid Flow Enums method, reverting back to behavior from before v0.232.
  • Support for $CharSet, an undocumented feature, has been removed. RegExp$flags, which depends on $CharSet, is also removed. In most cases, you should replace these types with string.
  • Support for --traces and the corresponding flowconfig option has been removed.
  • React.createFactory libdef is removed. This API is already deprecated and will be removed in React 19.

Notable bug fixes:

  • Fixed interactions of various types with specialized versions of mixed (such as $NonMaybeType<mixed>). (try-Flow examples)

Misc:

  • Support removing export type * (ExportAllDeclaration) nodes with flow-remove-types (thanks @jbroma!)

Parser:

  • Updated bigint literal AST output for bigint property to match ESTree spec. Numeric separators are removed (_), and should contain only decimal digits.

IDE:

  • Under component_syntax=true, autocomplete will provide component and hook keyword in appropriate places.

Library Definitions:

  • $asyncIterator, which is never a real global, is removed from global libdef.
  • We removed $await in the libdef. If you are depending on it like typeof $await, you can replace it with <T>(Promise<T> | T) => T.