diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 0476fd9cde0..3c209e86513 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -37,6 +37,7 @@ import type { ScrollEvent, LayoutEvent, } from '../../Types/CoreEventTypes'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; import type {State as ScrollResponderState} from '../ScrollResponder'; import type {ViewProps} from '../View/ViewPropTypes'; import type {Props as ScrollViewStickyHeaderProps} from './ScrollViewStickyHeader'; @@ -769,15 +770,11 @@ class ScrollView extends React.Component { return ReactNative.findNodeHandle(this._innerViewRef); } - getInnerViewRef(): ?React.ElementRef< - Class>, - > { + getInnerViewRef(): ?React.ElementRef> { return this._innerViewRef; } - getNativeScrollRef(): ?React.ElementRef< - Class>, - > { + getNativeScrollRef(): ?React.ElementRef> { return this._scrollViewRef; } @@ -950,21 +947,13 @@ class ScrollView extends React.Component { this.props.onContentSizeChange(width, height); }; - _scrollViewRef: ?React.ElementRef< - Class>, - > = null; - _setScrollViewRef = ( - ref: ?React.ElementRef>>, - ) => { + _scrollViewRef: ?React.ElementRef> = null; + _setScrollViewRef = (ref: ?React.ElementRef>) => { this._scrollViewRef = ref; }; - _innerViewRef: ?React.ElementRef< - Class>, - > = null; - _setInnerViewRef = ( - ref: ?React.ElementRef>>, - ) => { + _innerViewRef: ?React.ElementRef> = null; + _setInnerViewRef = (ref: ?React.ElementRef>) => { this._innerViewRef = ref; }; @@ -1068,7 +1057,6 @@ class ScrollView extends React.Component { const contentContainer = ( { // On iOS the RefreshControl is a child of the ScrollView. // tvOS lacks native support for RefreshControl, so don't include it in that case return ( - // $FlowFixMe {Platform.isTV ? null : refreshControl} {contentContainer} @@ -1197,7 +1184,6 @@ class ScrollView extends React.Component { {contentContainer} , @@ -1205,7 +1191,6 @@ class ScrollView extends React.Component { } } return ( - // $FlowFixMe {contentContainer}