Skip to content

Conversation

@everettbu
Copy link

@everettbu everettbu commented Dec 13, 2025

Mirror of facebook/react#35334
Original author: poteto


Updates flow-typed definitions and adds suppressions for regressions
in the updated type definitions:

  • TextDecoder: constructor options should be optional
  • TextEncoder: missing encodeInto method
  • ReadableStreamDefaultReader: cancel() returns Promise
  • Animation types: missing optional properties
  • error-stack-parser: module type export

Stack created with Sapling. Best reviewed with ReviewStack.

  • -> #35334
  • #35333
  • #35332
  • #35331
  • #35330
  • #35329

Flow 0.280 introduced stricter type checking for `incompatible-type` errors,
requiring additional $FlowFixMe suppressions alongside existing ones. Changes:

- Made `QueuingStrategy` properties optional in streams.js
- Made all properties optional in Web Animations API types (EffectTiming,
  KeyframeAnimationOptions, etc.)
- Added `$FlowFixMe[incompatible-type]` alongside existing suppressions in
  multiple files where Flow now reports additional type mismatches
Major changes in Flow 0.281:
- $FlowFixMe comments now require explicit error codes (e.g., $FlowFixMe[incompatible-type])
- Changed all bare $FlowFixMe to include appropriate error codes
- Changed $FlowIgnore to $FlowFixMe where needed
- Fixed stream types to have cancel() return Promise<void> instead of void
- Added pseudoElement property to KeyframeEffect type
- Added suppressions for Proxy handler variance issues
- Fixed various type errors across the codebase
Add suppression for React\$Element incompatibility with ReactNodeList in
  ReactDOMRootFB.js render function. Flow 0.282 has stricter type checking
  for the React\$Node union type.
Flow 0.286 introduced stricter constant-condition detection that flags build-time feature flags (supportsMutation, supportsHydration, isPrimaryRenderer, enableProfiling, etc.) and narrowed null checks. Added inline $FlowFixMe suppressions to preserve existing runtime behavior.
Flow 0.288 removed several React$ built-in types (React$Context,
React$ElementProps, React$ElementRef, React$RefSetter). Added
$FlowFixMe[cannot-resolve-name] suppressions to preserve type exports.
Updates flow-typed definitions and adds suppressions for regressions
  in the updated type definitions:
  - TextDecoder: constructor options should be optional
  - TextEncoder: missing encodeInto method
  - ReadableStreamDefaultReader: cancel() returns Promise<void>
  - Animation types: missing optional properties
  - error-stack-parser: module type export
@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants