Skip to content

Fix Flow types of useEffectEvent#26468

Merged
eps1lon merged 4 commits intofacebook:mainfrom
eps1lon:fix/useEffectEventTypes
Mar 25, 2023
Merged

Fix Flow types of useEffectEvent#26468
eps1lon merged 4 commits intofacebook:mainfrom
eps1lon:fix/useEffectEventTypes

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 24, 2023

Summary

Just copied the types over from the internal types. Type error was hidden by overly broad FlowFixMe. With $FlowFixMe[not-a-function] we would've seen the actual issue:

Cannot return `dispatcher.useEffectEvent(...)` because  `T` [1] is incompatible with  undefined [2].Flow(incompatible-return)

How did you test this change?

  • yarn flow dom-node
  • CI

Loading
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.

4 participants