Make type of RefreshControl.onRefresh less strict (#22376)

Summary:
I think a common pattern is to use async functions with the onRefresh prop to reload data. I made the type `mixed` since we don't care about what the function returns. Could also be `void | Promise<void>` I haven't really seen a pattern for those in the codebase.
Pull Request resolved: https://github.com/facebook/react-native/pull/22376

Differential Revision: D13310372

Pulled By: TheSavior

fbshipit-source-id: 445f28cf2c37f9c937e72d76716002deaf9d9c94
This commit is contained in:
Janic Duplessis 2018-12-03 14:54:26 -08:00 committed by Facebook Github Bot
parent 2330843fa7
commit ff6a53de2a

View File

@ -87,7 +87,7 @@ export type RefreshControlProps = $ReadOnly<{|
/**
* Called when the view starts refreshing.
*/
onRefresh?: ?() => void,
onRefresh?: ?() => mixed,
/**
* Whether the view should be indicating an active refresh.