Change ScrollView event flow types to support spreading

Summary: These need to be both optional and nullable to support spreading props like `<ScrollView {...props} />` where these types are optional in a parent component.

Reviewed By: lunaleaps

Differential Revision: D17859633

fbshipit-source-id: 093456d13ee041473a4605e62bf48b3510b49b8f
This commit is contained in:
Eli White 2019-10-11 09:44:48 -07:00 коммит произвёл Facebook Github Bot
Родитель fb5276c189
Коммит dd3bf0545a
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -460,26 +460,26 @@ export type Props = $ReadOnly<{|
/**
* Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).
*/
onMomentumScrollBegin?: (event: ScrollEvent) => void,
onMomentumScrollBegin?: ?(event: ScrollEvent) => void,
/**
* Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
*/
onMomentumScrollEnd?: (event: ScrollEvent) => void,
onMomentumScrollEnd?: ?(event: ScrollEvent) => void,
/**
* Fires at most once per frame during scrolling. The frequency of the
* events can be controlled using the `scrollEventThrottle` prop.
*/
onScroll?: (event: ScrollEvent) => void,
onScroll?: ?(event: ScrollEvent) => void,
/**
* Called when the user begins to drag the scroll view.
*/
onScrollBeginDrag?: (event: ScrollEvent) => void,
onScrollBeginDrag?: ?(event: ScrollEvent) => void,
/**
* Called when the user stops dragging the scroll view and it either stops
* or begins to glide.
*/
onScrollEndDrag?: (event: ScrollEvent) => void,
onScrollEndDrag?: ?(event: ScrollEvent) => void,
/**
* Called when scrollable content view of the ScrollView changes.
*