Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change onRefresh flow typing (#28167)
Summary: I propose this change because we (and a lot of other people, I'd guess) pass an `async` function as a parameter to `onRefresh`. Because the `async` function returns a `promise`, flow is reporting an error. I think the type checking here can be relaxed either all the way to `any` (because RN does not care here what we return) or to `void | Promise<void>` to account for async functions. looking at fb7b2d3#diff-a9c5687ae65236ba3e7f34bfdcdec81d seems like the second is preferred ## Changelog [General] [changed] - relax RefreshControl's onRefresh flow typing Pull Request resolved: #28167 Test Plan: * flow passes Reviewed By: hramos Differential Revision: D20196529 Pulled By: TheSavior fbshipit-source-id: bb5a314bcfb5fb9c8ab71eccb449f1322aeebacb
- Loading branch information