Skip to content

Commit

Permalink
Flow type RefreshControl (#22119)
Browse files Browse the repository at this point in the history
Summary:
Related to #22100

Enhance Flow types for RefreshControl specifying `onRefresh` props type.
There are still 2 `any` left using `requireNativeComponent` that need to be addressed to turn Flow to strict mode.

I went through `RCTRefreshControl` and `AndroidSwipeRefreshLayout` classes to understand where this method came from.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [RefreshControl.js] - Flow onRefresh type
Pull Request resolved: #22119

Differential Revision: D12919764

Pulled By: TheSavior

fbshipit-source-id: 9ba675be8dbce77d77972acb904fc13c68524831
  • Loading branch information
exced authored and facebook-github-bot committed Nov 5, 2018
1 parent 0ea95e7 commit 84c5416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/RefreshControl/RefreshControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export type RefreshControlProps = $ReadOnly<{|
/**
* Called when the view starts refreshing.
*/
onRefresh?: ?Function,
onRefresh?: ?() => void,

/**
* Whether the view should be indicating an active refresh.
Expand Down

0 comments on commit 84c5416

Please sign in to comment.