From 63f990121ad5f58dfd07ccfed2bb640b08164f73 Mon Sep 17 00:00:00 2001 From: Caleb Meredith Date: Tue, 29 Aug 2017 14:54:33 -0700 Subject: [PATCH] Fix React Native open source Reviewed By: hramos, TheSavior Differential Revision: D5728356 fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca --- IntegrationTests/IntegrationTestsApp.js | 7 +- Libraries/Animated/src/AnimatedEvent.js | 6 +- .../ActivityIndicator/ActivityIndicator.js | 6 +- Libraries/Components/CheckBox/CheckBox.js | 7 +- Libraries/Components/ScrollView/ScrollView.js | 95 ++++++++------- Libraries/Components/Switch/Switch.js | 13 +-- Libraries/Components/TextInput/TextInput.js | 12 +- .../Components/Touchable/TouchableBounce.js | 42 +++---- .../Touchable/TouchableHighlight.js | 60 +++++----- .../SwipeableRow/SwipeableListView.js | 13 +-- Libraries/Experimental/WindowedListView.js | 7 +- Libraries/Image/ImageBackground.js | 7 +- Libraries/Lists/FlatList.js | 7 +- Libraries/Lists/ListView/ListView.js | 12 +- Libraries/Lists/MetroListView.js | 52 ++++----- Libraries/Lists/SectionList.js | 7 +- Libraries/Lists/VirtualizedList.js | 109 ++++++++---------- Libraries/Lists/VirtualizedSectionList.js | 7 +- Libraries/ReactNative/AppContainer.js | 14 +-- Libraries/ReactNative/verifyPropTypes.js | 21 ++-- Libraries/Renderer/shims/ReactNativeTypes.js | 6 +- RNTester/js/ExampleTypes.js | 6 +- RNTester/js/ImageExample.js | 6 +- RNTester/js/PointerEventsExample.js | 7 +- RNTester/js/RNTesterApp.ios.js | 7 +- RNTester/js/RNTesterStatePersister.js | 7 +- RNTester/js/ScrollViewExample.js | 14 +-- 27 files changed, 257 insertions(+), 300 deletions(-) diff --git a/IntegrationTests/IntegrationTestsApp.js b/IntegrationTests/IntegrationTestsApp.js index 9e0539421..ebe48478d 100644 --- a/IntegrationTests/IntegrationTestsApp.js +++ b/IntegrationTests/IntegrationTestsApp.js @@ -57,10 +57,9 @@ class IntegrationTestsApp extends React.Component<{}, $FlowFixMeState> { if (this.state.test) { return ( - {/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */} + {/* $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. */} ); diff --git a/Libraries/Animated/src/AnimatedEvent.js b/Libraries/Animated/src/AnimatedEvent.js index e8ee358a2..206516f5d 100644 --- a/Libraries/Animated/src/AnimatedEvent.js +++ b/Libraries/Animated/src/AnimatedEvent.js @@ -144,9 +144,9 @@ class AnimatedEvent { recMapping.setValue(recEvt); } else if (typeof recMapping === 'object') { for (const mappingKey in recMapping) { - /* $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. */ + /* $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. */ traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey); } } diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/Libraries/Components/ActivityIndicator/ActivityIndicator.js index 17ed9a631..dd9706497 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicator.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicator.js @@ -37,9 +37,9 @@ type DefaultProps = { /** * Displays a circular loading indicator. */ -/* $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. */ +/* $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 ActivityIndicator = createReactClass({ displayName: 'ActivityIndicator', mixins: [NativeMethodsMixin], diff --git a/Libraries/Components/CheckBox/CheckBox.js b/Libraries/Components/CheckBox/CheckBox.js index 22ce3df87..183cbafa9 100644 --- a/Libraries/Components/CheckBox/CheckBox.js +++ b/Libraries/Components/CheckBox/CheckBox.js @@ -97,10 +97,9 @@ let CheckBox = createReactClass({ { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._rctCheckBox = ref; }} onChange={this._onChange} diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index b5836fa63..980d5d734 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -548,9 +548,9 @@ const ScrollView = createReactClass({ }, _getKeyForIndex: function(index, childArray) { - /* $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. */ + /* $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]; return child && child.key; }, @@ -580,9 +580,9 @@ const ScrollView = createReactClass({ if (!this.props.stickyHeaderIndices) { return; } - /* $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. */ + /* $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); if (key !== this._getKeyForIndex(index, childArray)) { // ignore stale layout update @@ -592,13 +592,13 @@ const ScrollView = createReactClass({ const layoutY = event.nativeEvent.layout.y; this._headerLayoutYs.set(key, layoutY); - /* $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. */ + /* $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); - /* $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. */ + /* $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]; if (previousHeaderIndex != null) { const previousHeader = this._stickyHeaderRefs.get( @@ -697,33 +697,34 @@ const ScrollView = createReactClass({ const {stickyHeaderIndices} = this.props; const hasStickyHeaders = stickyHeaderIndices && stickyHeaderIndices.length > 0; - /* $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. */ + /* $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 children = hasStickyHeaders ? - /* $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. */ + /* $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) => { - /* $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. */ + /* $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; if (indexOfIndex > -1) { const key = child.key; - /* $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. */ + /* $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]; return ( this._setStickyHeaderRef(key, ref)} nextHeaderLayoutY={ - /* $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. */ + /* $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)) } onLayout={(event) => this._onStickyHeaderLayout(index, event, key)} @@ -735,17 +736,16 @@ const ScrollView = createReactClass({ return child; } }) : - /* $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. */ + /* $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; const contentContainer = =0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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} style={contentContainerStyle} removeClippedSubviews={ @@ -786,9 +786,9 @@ const ScrollView = createReactClass({ onResponderGrant: this.scrollResponderHandleResponderGrant, onResponderReject: this.scrollResponderHandleResponderReject, onResponderRelease: this.scrollResponderHandleResponderRelease, - /* $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. */ + /* $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, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onScroll: this._handleScroll, @@ -818,10 +818,9 @@ const ScrollView = createReactClass({ // 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(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ {Platform.isTVOS ? null : refreshControl} {contentContainer} @@ -837,10 +836,9 @@ const ScrollView = createReactClass({ return React.cloneElement( refreshControl, {style: props.style}, - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ {contentContainer} @@ -848,10 +846,9 @@ const ScrollView = createReactClass({ } } return ( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ {contentContainer} diff --git a/Libraries/Components/Switch/Switch.js b/Libraries/Components/Switch/Switch.js index 3dd281316..7faed65d7 100644 --- a/Libraries/Components/Switch/Switch.js +++ b/Libraries/Components/Switch/Switch.js @@ -93,9 +93,9 @@ var Switch = createReactClass({ this._rctSwitch.setNativeProps({value: this.props.value}); } //Change the props after the native props are set in case the props change removes the component - /* $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. */ + /* $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.onChange && this.props.onChange(event); this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value); }, @@ -115,10 +115,9 @@ var Switch = createReactClass({ return ( =0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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={(ref) => { this._rctSwitch = ref; }} onChange={this._onChange} /> diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 89c7156d4..3629efa2c 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -734,9 +734,9 @@ const TextInput = createReactClass({ } props.autoCapitalize = UIManager.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize]; - /* $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. */ + /* $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 children = this.props.children; var childCount = 0; React.Children.forEach(children, () => ++childCount); @@ -897,9 +897,9 @@ const TextInput = createReactClass({ }, _onTextInput: function(event: Event) { - /* $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. */ + /* $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); }, diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index dac2b121a..cf0439c6b 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -139,36 +139,30 @@ var TouchableBounce = createReactClass({ render: function(): React.Element { return ( =0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ style={[{transform: [{scale: this.state.scale}]}, this.props.style]} accessible={this.props.accessible !== false} - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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} - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ accessibilityComponentType={this.props.accessibilityComponentType} - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ accessibilityTraits={this.props.accessibilityTraits} - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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} - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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} hitSlop={this.props.hitSlop} onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 79c049334..022419021 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -136,9 +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. */ + /* $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; return merge( this.touchableGetInitialState(), this._computeSyntheticState(this.props) @@ -146,18 +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. */ + /* $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; 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. */ + /* $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; }, @@ -185,9 +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. */ + /* $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._showUnderlay(); this.props.onPressIn && this.props.onPressIn(e); @@ -203,9 +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. */ + /* $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.props.delayPressOut || 100); this.props.onPress && this.props.onPress(e); @@ -247,9 +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. */ + /* $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; if (this._hasPressHandler() && this.refs[UNDERLAY_REF]) { this.refs[CHILD_REF].setNativeProps(INACTIVE_CHILD_PROPS); @@ -274,9 +274,9 @@ var TouchableHighlight = createReactClass({ return ( =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. */ + /* $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} accessibilityComponentType={this.props.accessibilityComponentType} accessibilityTraits={this.props.accessibilityTraits} @@ -293,18 +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. */ + /* $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} - /* $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. */ + /* $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}> {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. */ + /* $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), { ref: CHILD_REF, diff --git a/Libraries/Experimental/SwipeableRow/SwipeableListView.js b/Libraries/Experimental/SwipeableRow/SwipeableListView.js index fc365f597..0adaa6cf5 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableListView.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableListView.js @@ -115,16 +115,15 @@ class SwipeableListView extends React.Component { render(): React.Node { return ( - /* $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. */ + /* $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. */ { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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; }} dataSource={this.state.dataSource.getDataSource()} diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index 2fb8a042d..05e16ee7b 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -697,10 +697,9 @@ class CellRenderer extends React.Component { return newProps.rowData !== this.props.rowData; } _setRef = (ref) => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._containerRef = ref; }; render() { diff --git a/Libraries/Image/ImageBackground.js b/Libraries/Image/ImageBackground.js index a6c530230..f5229e53c 100644 --- a/Libraries/Image/ImageBackground.js +++ b/Libraries/Image/ImageBackground.js @@ -58,10 +58,9 @@ class ImageBackground extends React.Component<$FlowFixMeProps> { _viewRef: ?NativeMethodsMixinType = null; _captureRef = ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._viewRef = ref; }; diff --git a/Libraries/Lists/FlatList.js b/Libraries/Lists/FlatList.js index b35a2f418..6fc108e7c 100644 --- a/Libraries/Lists/FlatList.js +++ b/Libraries/Lists/FlatList.js @@ -412,10 +412,9 @@ class FlatList extends React.PureComponent, void> { _listRef: VirtualizedList; _captureRef = ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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; }; diff --git a/Libraries/Lists/ListView/ListView.js b/Libraries/Lists/ListView/ListView.js index 20d0bb4a4..1afdde664 100644 --- a/Libraries/Lists/ListView/ListView.js +++ b/Libraries/Lists/ListView/ListView.js @@ -92,9 +92,9 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50; * rendering rows. */ -/* $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. */ +/* $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({ displayName: 'ListView', _childFrames: ([]: Array), @@ -519,9 +519,9 @@ var ListView = createReactClass({ } Object.assign(props, { onScroll: this._onScroll, - /* $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. */ + /* $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( stickySectionHeaderIndices, ), diff --git a/Libraries/Lists/MetroListView.js b/Libraries/Lists/MetroListView.js index cb7e57bac..d168428ce 100644 --- a/Libraries/Lists/MetroListView.js +++ b/Libraries/Lists/MetroListView.js @@ -24,9 +24,9 @@ type Item = any; type NormalProps = { FooterComponent?: React.ComponentType<*>, renderItem: (info: Object) => ?React.Element, - /* $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. */ + /* $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. */ renderSectionHeader?: ({section: Object}) => ?React.Element, SeparatorComponent?: ?React.ComponentType<*>, // not supported yet @@ -107,15 +107,16 @@ class MetroListView extends React.Component { renderScrollComponent: (props: Props) => { if (props.onRefresh) { return ( - /* $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. */ + /* $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. */ =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. */ + /* $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. + */ { /> ); } else { - /* $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. */ + /* $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 ; } }, @@ -145,9 +146,9 @@ class MetroListView extends React.Component { } render() { return ( - /* $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. */ + /* $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. */ { } _listRef: ListView; _captureRef = ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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; }; _computeState(props: Props, state) { @@ -189,10 +189,9 @@ class MetroListView extends React.Component { }; } } - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an error - * when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ _renderFooter = () => ; _renderRow = (item, sectionID, rowID, highlightRow) => { return this.props.renderItem({item, index: rowID}); @@ -206,10 +205,9 @@ class MetroListView extends React.Component { return renderSectionHeader({section}); }; _renderSeparator = (sID, rID) => - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ ; } diff --git a/Libraries/Lists/SectionList.js b/Libraries/Lists/SectionList.js index cf5cbbb41..4741a7a4f 100644 --- a/Libraries/Lists/SectionList.js +++ b/Libraries/Lists/SectionList.js @@ -332,10 +332,9 @@ class SectionList> extends React.PureComponent< _wrapperListRef: MetroListView | VirtualizedSectionList; _captureRef = ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._wrapperListRef = ref; }; } diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 3d1d8cea2..a9da20054 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -221,15 +221,13 @@ class VirtualizedList extends React.PureComponent { this._footerLength - this._scrollMetrics.visibleLength, ); - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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.horizontal ? {x: offset, animated} : {y: offset, animated}, ); } @@ -260,15 +258,13 @@ class VirtualizedList extends React.PureComponent { (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length), ) - (viewOffset || 0); - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ horizontal ? {x: offset, animated} : {y: offset, animated}, ); } @@ -303,15 +299,13 @@ class VirtualizedList extends React.PureComponent { */ scrollToOffset(params: {animated?: ?boolean, offset: number}) { const {animated, offset} = params; - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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.horizontal ? {x: offset, animated} : {y: offset, animated}, ); } @@ -322,10 +316,9 @@ class VirtualizedList extends React.PureComponent { } flashScrollIndicators() { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._scrollRef.flashScrollIndicators(); } @@ -336,20 +329,18 @@ class VirtualizedList extends React.PureComponent { */ getScrollResponder() { if (this._scrollRef && this._scrollRef.getScrollResponder) { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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 this._scrollRef.getScrollResponder(); } } getScrollableNode() { if (this._scrollRef && this._scrollRef.getScrollableNode) { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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 this._scrollRef.getScrollableNode(); } else { return ReactNative.findNodeHandle(this._scrollRef); @@ -358,10 +349,9 @@ class VirtualizedList extends React.PureComponent { setNativeProps(props: Object) { if (this._scrollRef) { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._scrollRef.setNativeProps(props); } } @@ -579,10 +569,9 @@ class VirtualizedList extends React.PureComponent { ? ListHeaderComponent // $FlowFixMe : ; cells.push( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ { ? ListEmptyComponent // $FlowFixMe : ; cells.push( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ { ? ListFooterComponent // $FlowFixMe : ; cells.push( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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 ( - /* $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. */ + /* $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. */ =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. */ + /* $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. */ { /> ); } else { - /* $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. */ + /* $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 ; } }; diff --git a/Libraries/Lists/VirtualizedSectionList.js b/Libraries/Lists/VirtualizedSectionList.js index e4ab9883b..1db79c5c6 100644 --- a/Libraries/Lists/VirtualizedSectionList.js +++ b/Libraries/Lists/VirtualizedSectionList.js @@ -371,10 +371,9 @@ class VirtualizedSectionList extends React.PureComponent< _cellRefs = {}; _listRef: VirtualizedList; _captureRef = ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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; }; } diff --git a/Libraries/ReactNative/AppContainer.js b/Libraries/ReactNative/AppContainer.js index 88c09da20..f836f08da 100644 --- a/Libraries/ReactNative/AppContainer.js +++ b/Libraries/ReactNative/AppContainer.js @@ -25,10 +25,9 @@ type Context = { rootTag: number, }; type Props = {| - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an error - * when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ children?: React.Children, rootTag: number, WrapperComponent?: ?React.ComponentType<*>, @@ -106,10 +105,9 @@ class AppContainer extends React.Component { pointerEvents="box-none" style={styles.appContainer} ref={ref => { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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._mainRef = ref; }}> {this.props.children} diff --git a/Libraries/ReactNative/verifyPropTypes.js b/Libraries/ReactNative/verifyPropTypes.js index 0a5be68ac..f559c7597 100644 --- a/Libraries/ReactNative/verifyPropTypes.js +++ b/Libraries/ReactNative/verifyPropTypes.js @@ -43,10 +43,9 @@ function verifyPropTypes( if (!propTypes) { throw new Error( - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ '`' + componentName + '` has no propTypes defined`' ); } @@ -58,17 +57,15 @@ function verifyPropTypes( (!nativePropsToIgnore || !nativePropsToIgnore[prop])) { var message; if (propTypes.hasOwnProperty(prop)) { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ message = '`' + componentName + '` has incorrectly defined propType for native prop `' + viewConfig.uiViewClassName + '.' + prop + '` of native type `' + nativeProps[prop]; } else { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found - * when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ message = '`' + componentName + '` has no propType for native prop `' + viewConfig.uiViewClassName + '.' + prop + '` of native type `' + nativeProps[prop] + '`'; diff --git a/Libraries/Renderer/shims/ReactNativeTypes.js b/Libraries/Renderer/shims/ReactNativeTypes.js index e78103d45..8abb60fd6 100644 --- a/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/Libraries/Renderer/shims/ReactNativeTypes.js @@ -11,9 +11,9 @@ */ 'use strict'; -/* $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. */ +/* $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. */ import type React from 'react'; export type MeasureOnSuccessCallback = ( diff --git a/RNTester/js/ExampleTypes.js b/RNTester/js/ExampleTypes.js index 464363148..9b6ae7787 100644 --- a/RNTester/js/ExampleTypes.js +++ b/RNTester/js/ExampleTypes.js @@ -11,9 +11,9 @@ */ 'use strict'; -/* $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. */ +/* $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. */ import type React from 'react'; export type Example = { diff --git a/RNTester/js/ImageExample.js b/RNTester/js/ImageExample.js index 206aa4f23..9876fbee3 100644 --- a/RNTester/js/ImageExample.js +++ b/RNTester/js/ImageExample.js @@ -98,9 +98,9 @@ var NetworkImageCallbackExample = createReactClass({ }, _loadEventFired(event) { - /* $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. */ + /* $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.setState((state) => { return state.events = [...state.events, event]; }); diff --git a/RNTester/js/PointerEventsExample.js b/RNTester/js/PointerEventsExample.js index 7307eb3d4..e255d2f47 100644 --- a/RNTester/js/PointerEventsExample.js +++ b/RNTester/js/PointerEventsExample.js @@ -46,10 +46,9 @@ class ExampleBox extends React.Component<$FlowFixMeProps, $FlowFixMeState> { - {/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */} + {/* $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 (
- {/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */} + {/* $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.ComponentType { return class ComponentWithPersistedState extends React.Component { - /* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an - * error when upgrading Flow's support for React. Common errors found when - * upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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. */ static displayName = `RNTesterStatePersister(${Component.displayName || Component.name})`; state = {value: spec.getInitialState(this.props)}; _cacheKey = `RNTester:${spec.version || 'v1'}:${spec.cacheKeySuffix(this.props)}`; diff --git a/RNTester/js/ScrollViewExample.js b/RNTester/js/ScrollViewExample.js index 1736d466a..1da4a0244 100644 --- a/RNTester/js/ScrollViewExample.js +++ b/RNTester/js/ScrollViewExample.js @@ -35,10 +35,9 @@ exports.examples = [ return ( =0.53.0 site=react_native_fb) This comment suppresses - * an error when upgrading Flow's support for React. Common errors - * found when upgrading Flow's React support are documented at - * https://fburl.com/eq7bs81w */ + /* $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; }} automaticallyAdjustContentInsets={false} onScroll={() => { console.log('onScroll!'); }} @@ -77,10 +76,9 @@ exports.examples = [ {title} =0.53.0 site=react_native_fb) This comment - * suppresses an error when upgrading Flow's support for React. - * Common errors found when upgrading Flow's React support are - * documented at https://fburl.com/eq7bs81w */ + /* $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; }} automaticallyAdjustContentInsets={false} horizontal={true}