@allow-large-files Flow 0.58 upgrade for xplat/js

Reviewed By: yungsters

Differential Revision: D6219339

fbshipit-source-id: f003111500ef5971b9a95f26d43cee6644c16abe
This commit is contained in:
Avik Chaudhuri 2017-11-02 10:40:01 -07:00 committed by Facebook Github Bot
parent 74371bc50d
commit a48da14800
14 changed files with 7 additions and 142 deletions

View File

@ -46,12 +46,12 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState suppress_type=$FlowFixMeState
suppress_type=$FixMe suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\) suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true unsafe.enable_getters_and_setters=true
[version] [version]
^0.57.0 ^0.58.0

View File

@ -551,9 +551,6 @@ const ScrollView = createReactClass({
}, },
_getKeyForIndex: function(index, childArray) { _getKeyForIndex: function(index, childArray) {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
const child = childArray[index]; const child = childArray[index];
return child && child.key; return child && child.key;
}, },
@ -583,9 +580,6 @@ const ScrollView = createReactClass({
if (!this.props.stickyHeaderIndices) { if (!this.props.stickyHeaderIndices) {
return; return;
} }
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
const childArray = React.Children.toArray(this.props.children); const childArray = React.Children.toArray(this.props.children);
if (key !== this._getKeyForIndex(index, childArray)) { if (key !== this._getKeyForIndex(index, childArray)) {
// ignore stale layout update // ignore stale layout update
@ -595,13 +589,7 @@ const ScrollView = createReactClass({
const layoutY = event.nativeEvent.layout.y; const layoutY = event.nativeEvent.layout.y;
this._headerLayoutYs.set(key, layoutY); this._headerLayoutYs.set(key, layoutY);
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
const indexOfIndex = this.props.stickyHeaderIndices.indexOf(index); const indexOfIndex = this.props.stickyHeaderIndices.indexOf(index);
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
const previousHeaderIndex = this.props.stickyHeaderIndices[indexOfIndex - 1]; const previousHeaderIndex = this.props.stickyHeaderIndices[indexOfIndex - 1];
if (previousHeaderIndex != null) { if (previousHeaderIndex != null) {
const previousHeader = this._stickyHeaderRefs.get( const previousHeader = this._stickyHeaderRefs.get(
@ -701,34 +689,18 @@ const ScrollView = createReactClass({
const {stickyHeaderIndices} = this.props; const {stickyHeaderIndices} = this.props;
const hasStickyHeaders = stickyHeaderIndices && stickyHeaderIndices.length > 0; const hasStickyHeaders = stickyHeaderIndices && stickyHeaderIndices.length > 0;
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
const childArray = hasStickyHeaders && React.Children.toArray(this.props.children); const childArray = hasStickyHeaders && React.Children.toArray(this.props.children);
const children = hasStickyHeaders ? const children = hasStickyHeaders ?
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
childArray.map((child, index) => { childArray.map((child, index) => {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
const indexOfIndex = child ? stickyHeaderIndices.indexOf(index) : -1; const indexOfIndex = child ? stickyHeaderIndices.indexOf(index) : -1;
if (indexOfIndex > -1) { if (indexOfIndex > -1) {
const key = child.key; const key = child.key;
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
const nextIndex = stickyHeaderIndices[indexOfIndex + 1]; const nextIndex = stickyHeaderIndices[indexOfIndex + 1];
return ( return (
<ScrollViewStickyHeader <ScrollViewStickyHeader
key={key} key={key}
ref={(ref) => this._setStickyHeaderRef(key, ref)} ref={(ref) => this._setStickyHeaderRef(key, ref)}
nextHeaderLayoutY={ nextHeaderLayoutY={
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss)
* This comment suppresses an error when upgrading Flow's
* support for React. To see the error delete this comment and
* run Flow. */
this._headerLayoutYs.get(this._getKeyForIndex(nextIndex, childArray)) this._headerLayoutYs.get(this._getKeyForIndex(nextIndex, childArray))
} }
onLayout={(event) => this._onStickyHeaderLayout(index, event, key)} onLayout={(event) => this._onStickyHeaderLayout(index, event, key)}
@ -740,16 +712,10 @@ const ScrollView = createReactClass({
return child; return child;
} }
}) : }) :
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
this.props.children; this.props.children;
const contentContainer = const contentContainer =
<ScrollContentContainerViewClass <ScrollContentContainerViewClass
{...contentSizeChangeProps} {...contentSizeChangeProps}
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
ref={this._setInnerViewRef} ref={this._setInnerViewRef}
style={contentContainerStyle} style={contentContainerStyle}
removeClippedSubviews={ removeClippedSubviews={
@ -790,9 +756,6 @@ const ScrollView = createReactClass({
onResponderGrant: this.scrollResponderHandleResponderGrant, onResponderGrant: this.scrollResponderHandleResponderGrant,
onResponderReject: this.scrollResponderHandleResponderReject, onResponderReject: this.scrollResponderHandleResponderReject,
onResponderRelease: this.scrollResponderHandleResponderRelease, onResponderRelease: this.scrollResponderHandleResponderRelease,
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
onResponderTerminate: this.scrollResponderHandleTerminate, onResponderTerminate: this.scrollResponderHandleTerminate,
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,
onScroll: this._handleScroll, onScroll: this._handleScroll,
@ -823,9 +786,6 @@ const ScrollView = createReactClass({
// On iOS the RefreshControl is a child of the ScrollView. // On iOS the RefreshControl is a child of the ScrollView.
// tvOS lacks native support for RefreshControl, so don't include it in that case // tvOS lacks native support for RefreshControl, so don't include it in that case
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
<ScrollViewClass {...props} ref={this._setScrollViewRef}> <ScrollViewClass {...props} ref={this._setScrollViewRef}>
{Platform.isTVOS ? null : refreshControl} {Platform.isTVOS ? null : refreshControl}
{contentContainer} {contentContainer}
@ -841,9 +801,6 @@ const ScrollView = createReactClass({
return React.cloneElement( return React.cloneElement(
refreshControl, refreshControl,
{style: props.style}, {style: props.style},
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
<ScrollViewClass {...props} style={baseStyle} ref={this._setScrollViewRef}> <ScrollViewClass {...props} style={baseStyle} ref={this._setScrollViewRef}>
{contentContainer} {contentContainer}
</ScrollViewClass> </ScrollViewClass>
@ -851,9 +808,6 @@ const ScrollView = createReactClass({
} }
} }
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
<ScrollViewClass {...props} ref={this._setScrollViewRef}> <ScrollViewClass {...props} ref={this._setScrollViewRef}>
{contentContainer} {contentContainer}
</ScrollViewClass> </ScrollViewClass>

View File

@ -954,9 +954,6 @@ const TextInput = createReactClass({
}, },
_onTextInput: function(event: Event) { _onTextInput: function(event: Event) {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this.props.onTextInput && this.props.onTextInput(event); this.props.onTextInput && this.props.onTextInput(event);
}, },

View File

@ -210,9 +210,6 @@ var TouchableHighlight = createReactClass({
}, },
getInitialState: function() { getInitialState: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._isMounted = false; this._isMounted = false;
return merge( return merge(
this.touchableGetInitialState(), this._computeSyntheticState(this.props) this.touchableGetInitialState(), this._computeSyntheticState(this.props)
@ -220,18 +217,12 @@ var TouchableHighlight = createReactClass({
}, },
componentDidMount: function() { componentDidMount: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._isMounted = true; this._isMounted = true;
ensurePositiveDelayProps(this.props); ensurePositiveDelayProps(this.props);
ensureComponentIsNative(this.refs[CHILD_REF]); ensureComponentIsNative(this.refs[CHILD_REF]);
}, },
componentWillUnmount: function() { componentWillUnmount: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._isMounted = false; this._isMounted = false;
}, },
@ -259,9 +250,6 @@ var TouchableHighlight = createReactClass({
*/ */
touchableHandleActivePressIn: function(e: Event) { touchableHandleActivePressIn: function(e: Event) {
this.clearTimeout(this._hideTimeout); this.clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._hideTimeout = null; this._hideTimeout = null;
this._showUnderlay(); this._showUnderlay();
this.props.onPressIn && this.props.onPressIn(e); this.props.onPressIn && this.props.onPressIn(e);
@ -277,9 +265,6 @@ var TouchableHighlight = createReactClass({
touchableHandlePress: function(e: Event) { touchableHandlePress: function(e: Event) {
this.clearTimeout(this._hideTimeout); this.clearTimeout(this._hideTimeout);
this._showUnderlay(); this._showUnderlay();
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._hideTimeout = this.setTimeout(this._hideUnderlay, this._hideTimeout = this.setTimeout(this._hideUnderlay,
this.props.delayPressOut || 100); this.props.delayPressOut || 100);
this.props.onPress && this.props.onPress(e); this.props.onPress && this.props.onPress(e);
@ -321,9 +306,6 @@ var TouchableHighlight = createReactClass({
_hideUnderlay: function() { _hideUnderlay: function() {
this.clearTimeout(this._hideTimeout); this.clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._hideTimeout = null; this._hideTimeout = null;
if (this._hasPressHandler() && this.refs[UNDERLAY_REF]) { if (this._hasPressHandler() && this.refs[UNDERLAY_REF]) {
this.refs[CHILD_REF].setNativeProps(INACTIVE_CHILD_PROPS); this.refs[CHILD_REF].setNativeProps(INACTIVE_CHILD_PROPS);
@ -348,9 +330,6 @@ var TouchableHighlight = createReactClass({
return ( return (
<View <View
accessible={this.props.accessible !== false} accessible={this.props.accessible !== false}
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
accessibilityLabel={this.props.accessibilityLabel} accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType} accessibilityComponentType={this.props.accessibilityComponentType}
accessibilityTraits={this.props.accessibilityTraits} accessibilityTraits={this.props.accessibilityTraits}
@ -367,18 +346,9 @@ var TouchableHighlight = createReactClass({
onResponderMove={this.touchableHandleResponderMove} onResponderMove={this.touchableHandleResponderMove}
onResponderRelease={this.touchableHandleResponderRelease} onResponderRelease={this.touchableHandleResponderRelease}
onResponderTerminate={this.touchableHandleResponderTerminate} onResponderTerminate={this.touchableHandleResponderTerminate}
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
nativeID={this.props.nativeID} nativeID={this.props.nativeID}
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
testID={this.props.testID}> testID={this.props.testID}>
{React.cloneElement( {React.cloneElement(
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
React.Children.only(this.props.children), React.Children.only(this.props.children),
{ {
ref: CHILD_REF, ref: CHILD_REF,

View File

@ -186,13 +186,10 @@ const TouchableWithoutFeedback = createReactClass({
child.props.style; child.props.style;
return (React: any).cloneElement(child, { return (React: any).cloneElement(child, {
accessible: this.props.accessible !== false, accessible: this.props.accessible !== false,
// $FlowFixMe(>=0.41.0)
accessibilityLabel: this.props.accessibilityLabel, accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType, accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits, accessibilityTraits: this.props.accessibilityTraits,
// $FlowFixMe(>=0.41.0)
nativeID: this.props.nativeID, nativeID: this.props.nativeID,
// $FlowFixMe(>=0.41.0)
testID: this.props.testID, testID: this.props.testID,
onLayout: this.props.onLayout, onLayout: this.props.onLayout,
hitSlop: this.props.hitSlop, hitSlop: this.props.hitSlop,

View File

@ -115,15 +115,9 @@ class SwipeableListView extends React.Component<Props, State> {
render(): React.Node { render(): React.Node {
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
<ListView <ListView
{...this.props} {...this.props}
ref={(ref) => { ref={(ref) => {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
this._listViewRef = ref; this._listViewRef = ref;
}} }}
dataSource={this.state.dataSource.getDataSource()} dataSource={this.state.dataSource.getDataSource()}

View File

@ -98,9 +98,6 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50;
* rendering rows. * rendering rows.
*/ */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
var ListView = createReactClass({ var ListView = createReactClass({
displayName: 'ListView', displayName: 'ListView',
_childFrames: ([]: Array<Object>), _childFrames: ([]: Array<Object>),
@ -522,14 +519,8 @@ var ListView = createReactClass({
if (props.removeClippedSubviews === undefined) { if (props.removeClippedSubviews === undefined) {
props.removeClippedSubviews = true; props.removeClippedSubviews = true;
} }
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error found when Flow v0.54 was deployed. To see the error
* delete this comment and run Flow. */
Object.assign(props, { Object.assign(props, {
onScroll: this._onScroll, onScroll: this._onScroll,
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
stickyHeaderIndices: this.props.stickyHeaderIndices.concat( stickyHeaderIndices: this.props.stickyHeaderIndices.concat(
stickySectionHeaderIndices, stickySectionHeaderIndices,
), ),

View File

@ -107,9 +107,6 @@ class MetroListView extends React.Component<Props, $FlowFixMeState> {
renderScrollComponent: (props: Props) => { renderScrollComponent: (props: Props) => {
if (props.onRefresh) { if (props.onRefresh) {
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
<ScrollView <ScrollView
{...props} {...props}
refreshControl={ refreshControl={
@ -125,9 +122,6 @@ class MetroListView extends React.Component<Props, $FlowFixMeState> {
/> />
); );
} else { } else {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
return <ScrollView {...props} />; return <ScrollView {...props} />;
} }
}, },
@ -146,9 +140,6 @@ class MetroListView extends React.Component<Props, $FlowFixMeState> {
} }
render() { render() {
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
<ListView <ListView
{...this.props} {...this.props}
dataSource={this.state.ds} dataSource={this.state.ds}
@ -162,9 +153,6 @@ class MetroListView extends React.Component<Props, $FlowFixMeState> {
} }
_listRef: ListView; _listRef: ListView;
_captureRef = ref => { _captureRef = ref => {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._listRef = ref; this._listRef = ref;
}; };
_computeState(props: Props, state) { _computeState(props: Props, state) {

View File

@ -853,9 +853,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
'`', '`',
); );
return ( return (
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
<ScrollView <ScrollView
{...props} {...props}
refreshControl={ refreshControl={
@ -871,9 +868,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
/> />
); );
} else { } else {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
return <ScrollView {...props} />; return <ScrollView {...props} />;
} }
}; };

View File

@ -489,44 +489,33 @@ const Text = createReactClass({
return this.props.pressRetentionOffset || PRESS_RECT_OFFSET; return this.props.pressRetentionOffset || PRESS_RECT_OFFSET;
}; };
} }
// $FlowFixMe(>=0.41.0)
return setResponder; return setResponder;
}, },
onResponderGrant: function(e: SyntheticEvent<>, dispatchID: string) { onResponderGrant: function(e: SyntheticEvent<>, dispatchID: string) {
// $FlowFixMe(>=0.41.0)
this.touchableHandleResponderGrant(e, dispatchID); this.touchableHandleResponderGrant(e, dispatchID);
this.props.onResponderGrant && this.props.onResponderGrant &&
// $FlowFixMe(>=0.41.0)
this.props.onResponderGrant.apply(this, arguments); this.props.onResponderGrant.apply(this, arguments);
}.bind(this), }.bind(this),
onResponderMove: function(e: SyntheticEvent<>) { onResponderMove: function(e: SyntheticEvent<>) {
// $FlowFixMe(>=0.41.0)
this.touchableHandleResponderMove(e); this.touchableHandleResponderMove(e);
this.props.onResponderMove && this.props.onResponderMove &&
// $FlowFixMe(>=0.41.0)
this.props.onResponderMove.apply(this, arguments); this.props.onResponderMove.apply(this, arguments);
}.bind(this), }.bind(this),
onResponderRelease: function(e: SyntheticEvent<>) { onResponderRelease: function(e: SyntheticEvent<>) {
// $FlowFixMe(>=0.41.0)
this.touchableHandleResponderRelease(e); this.touchableHandleResponderRelease(e);
this.props.onResponderRelease && this.props.onResponderRelease &&
// $FlowFixMe(>=0.41.0)
this.props.onResponderRelease.apply(this, arguments); this.props.onResponderRelease.apply(this, arguments);
}.bind(this), }.bind(this),
onResponderTerminate: function(e: SyntheticEvent<>) { onResponderTerminate: function(e: SyntheticEvent<>) {
// $FlowFixMe(>=0.41.0)
this.touchableHandleResponderTerminate(e); this.touchableHandleResponderTerminate(e);
this.props.onResponderTerminate && this.props.onResponderTerminate &&
// $FlowFixMe(>=0.41.0)
this.props.onResponderTerminate.apply(this, arguments); this.props.onResponderTerminate.apply(this, arguments);
}.bind(this), }.bind(this),
onResponderTerminationRequest: function(): bool { onResponderTerminationRequest: function(): bool {
// Allow touchable or props.onResponderTerminationRequest to deny // Allow touchable or props.onResponderTerminationRequest to deny
// the request // the request
// $FlowFixMe(>=0.41.0)
var allowTermination = this.touchableHandleResponderTerminationRequest(); var allowTermination = this.touchableHandleResponderTerminationRequest();
if (allowTermination && this.props.onResponderTerminationRequest) { if (allowTermination && this.props.onResponderTerminationRequest) {
// $FlowFixMe(>=0.41.0)
allowTermination = this.props.onResponderTerminationRequest.apply(this, arguments); allowTermination = this.props.onResponderTerminationRequest.apply(this, arguments);
} }
return allowTermination; return allowTermination;

View File

@ -35,9 +35,6 @@ exports.examples = [
return ( return (
<View> <View>
<ScrollView <ScrollView
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
ref={(scrollView) => { _scrollView = scrollView; }} ref={(scrollView) => { _scrollView = scrollView; }}
automaticallyAdjustContentInsets={false} automaticallyAdjustContentInsets={false}
onScroll={() => { console.log('onScroll!'); }} onScroll={() => { console.log('onScroll!'); }}
@ -74,9 +71,6 @@ exports.examples = [
<View style={addtionalStyles}> <View style={addtionalStyles}>
<Text style={styles.text}>{title}</Text> <Text style={styles.text}>{title}</Text>
<ScrollView <ScrollView
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
ref={(scrollView) => { _scrollView = scrollView; }} ref={(scrollView) => { _scrollView = scrollView; }}
automaticallyAdjustContentInsets={false} automaticallyAdjustContentInsets={false}
horizontal={true} horizontal={true}

View File

@ -53,9 +53,6 @@ function saveBundle(output, bundle, args) {
/* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an
* error found when Flow v0.56 was deployed. To see the error delete this * error found when Flow v0.56 was deployed. To see the error delete this
* comment and run Flow. */ * comment and run Flow. */
/* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error found when Flow v0.56 was deployed. To see the error
* delete this comment and run Flow. */
output.save(bundle, args, log) output.save(bundle, args, log)
).then(() => bundle); ).then(() => bundle);
} }

View File

@ -37,12 +37,12 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState suppress_type=$FlowFixMeState
suppress_type=$FixMe suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true unsafe.enable_getters_and_setters=true
[version] [version]
^0.57.0 ^0.58.0

View File

@ -199,7 +199,7 @@
"eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-flowtype": "^2.33.0",
"eslint-plugin-prettier": "2.1.1", "eslint-plugin-prettier": "2.1.1",
"eslint-plugin-react": "^7.2.1", "eslint-plugin-react": "^7.2.1",
"flow-bin": "^0.57.0", "flow-bin": "^0.58.0",
"jest": "^21", "jest": "^21",
"prettier": "1.7.0", "prettier": "1.7.0",
"react": "16.0.0", "react": "16.0.0",