Add suppressions for Flow v0.53.0 before React changes

Reviewed By: avikchaudhuri

Differential Revision: D5648801

fbshipit-source-id: c4eb1bee198a177b69b6e9414111ce957b4d27ff
This commit is contained in:
Caleb Meredith
2017-08-17 05:07:37 -07:00
committed by Facebook Github Bot
parent bb98fddbec
commit 30d9c3d279
18 changed files with 136 additions and 3 deletions

View File

@@ -136,6 +136,9 @@ var TouchableHighlight = createReactClass({
},
getInitialState: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._isMounted = false;
return merge(
this.touchableGetInitialState(), this._computeSyntheticState(this.props)
@@ -143,12 +146,18 @@ var TouchableHighlight = createReactClass({
},
componentDidMount: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._isMounted = true;
ensurePositiveDelayProps(this.props);
ensureComponentIsNative(this.refs[CHILD_REF]);
},
componentWillUnmount: function() {
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._isMounted = false;
},
@@ -176,6 +185,9 @@ var TouchableHighlight = createReactClass({
*/
touchableHandleActivePressIn: function(e: Event) {
this.clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._hideTimeout = null;
this._showUnderlay();
this.props.onPressIn && this.props.onPressIn(e);
@@ -191,6 +203,9 @@ var TouchableHighlight = createReactClass({
touchableHandlePress: function(e: Event) {
this.clearTimeout(this._hideTimeout);
this._showUnderlay();
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._hideTimeout = this.setTimeout(this._hideUnderlay,
this.props.delayPressOut || 100);
this.props.onPress && this.props.onPress(e);
@@ -232,6 +247,9 @@ var TouchableHighlight = createReactClass({
_hideUnderlay: function() {
this.clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
this._hideTimeout = null;
if (this._hasPressHandler() && this.refs[UNDERLAY_REF]) {
this.refs[CHILD_REF].setNativeProps(INACTIVE_CHILD_PROPS);
@@ -256,6 +274,9 @@ var TouchableHighlight = createReactClass({
return (
<View
accessible={this.props.accessible !== false}
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete
* this comment and run Flow. */
accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType}
accessibilityTraits={this.props.accessibilityTraits}
@@ -272,9 +293,18 @@ var TouchableHighlight = createReactClass({
onResponderMove={this.touchableHandleResponderMove}
onResponderRelease={this.touchableHandleResponderRelease}
onResponderTerminate={this.touchableHandleResponderTerminate}
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete
* this comment and run Flow. */
nativeID={this.props.nativeID}
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete
* this comment and run Flow. */
testID={this.props.testID}>
{React.cloneElement(
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.53 was deployed. To see the error
* delete this comment and run Flow. */
React.Children.only(this.props.children),
{
ref: CHILD_REF,