diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 1f646426f..7415c285a 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -2501,6 +2501,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. */ traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey); } } diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/Libraries/Components/ActivityIndicator/ActivityIndicator.js index 4cc7759e4..17ed9a631 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicator.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicator.js @@ -37,6 +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. */ const ActivityIndicator = createReactClass({ displayName: 'ActivityIndicator', mixins: [NativeMethodsMixin], diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 1787476ba..fe17d0a61 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -548,6 +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. */ const child = childArray[index]; return child && child.key; }, @@ -577,6 +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. */ const childArray = React.Children.toArray(this.props.children); if (key !== this._getKeyForIndex(index, childArray)) { // ignore stale layout update @@ -586,7 +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. */ 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. */ const previousHeaderIndex = this.props.stickyHeaderIndices[indexOfIndex - 1]; if (previousHeaderIndex != null) { const previousHeader = this._stickyHeaderRefs.get( @@ -685,18 +697,33 @@ 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. */ 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. */ 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. */ 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. */ 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. */ this._headerLayoutYs.get(this._getKeyForIndex(nextIndex, childArray)) } onLayout={(event) => this._onStickyHeaderLayout(index, event, key)} @@ -708,6 +735,9 @@ 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. */ this.props.children; const contentContainer = =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. */ onResponderTerminate: this.scrollResponderHandleTerminate, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onScroll: this._handleScroll, diff --git a/Libraries/Components/Switch/Switch.js b/Libraries/Components/Switch/Switch.js index e7b456af9..319c65f07 100644 --- a/Libraries/Components/Switch/Switch.js +++ b/Libraries/Components/Switch/Switch.js @@ -93,6 +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. */ this.props.onChange && this.props.onChange(event); this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value); }, diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index b0c8127ed..89c7156d4 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -734,6 +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. */ var children = this.props.children; var childCount = 0; React.Children.forEach(children, () => ++childCount); @@ -894,6 +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. */ this.props.onTextInput && this.props.onTextInput(event); }, diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 19e601247..79c049334 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -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 ( =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, diff --git a/Libraries/Experimental/SwipeableRow/SwipeableListView.js b/Libraries/Experimental/SwipeableRow/SwipeableListView.js index a872600cc..e542f2f84 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableListView.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableListView.js @@ -115,6 +115,9 @@ class SwipeableListView extends React.Component { render(): React.Element { 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. */ { diff --git a/Libraries/Inspector/BoxInspector.js b/Libraries/Inspector/BoxInspector.js index 7234db08d..1f9306f1d 100644 --- a/Libraries/Inspector/BoxInspector.js +++ b/Libraries/Inspector/BoxInspector.js @@ -53,6 +53,9 @@ class BoxContainer extends React.Component { 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. */} {this.props.title} {box.top} diff --git a/Libraries/Lists/ListView/ListView.js b/Libraries/Lists/ListView/ListView.js index d2f9ff2c3..20d0bb4a4 100644 --- a/Libraries/Lists/ListView/ListView.js +++ b/Libraries/Lists/ListView/ListView.js @@ -92,6 +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. */ var ListView = createReactClass({ displayName: 'ListView', _childFrames: ([]: Array), @@ -516,6 +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. */ stickyHeaderIndices: this.props.stickyHeaderIndices.concat( stickySectionHeaderIndices, ), diff --git a/Libraries/Lists/ListView/ListViewDataSource.js b/Libraries/Lists/ListView/ListViewDataSource.js index 3675dc396..adc2f776f 100644 --- a/Libraries/Lists/ListView/ListViewDataSource.js +++ b/Libraries/Lists/ListView/ListViewDataSource.js @@ -18,7 +18,13 @@ var warning = require('fbjs/lib/warning'); function defaultGetRowData( dataBlob: any, + /* $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. */ sectionID: number | string, + /* $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. */ rowID: number | string, ): any { return dataBlob[sectionID][rowID]; diff --git a/Libraries/Lists/MetroListView.js b/Libraries/Lists/MetroListView.js index 48968cdc5..ff6afeb03 100644 --- a/Libraries/Lists/MetroListView.js +++ b/Libraries/Lists/MetroListView.js @@ -24,6 +24,9 @@ type Item = any; type NormalProps = { FooterComponent?: ReactClass<*>, 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. */ renderSectionHeader?: ({section: Object}) => ?React.Element<*>, SeparatorComponent?: ?ReactClass<*>, // not supported yet @@ -105,9 +108,15 @@ 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. */ =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. */ ); } 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. */ return ; } }, @@ -134,6 +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. */ { '`', ); 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. */ =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. */ { /> ); } 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. */ return ; } }; diff --git a/Libraries/Renderer/shims/ReactNativeTypes.js b/Libraries/Renderer/shims/ReactNativeTypes.js index 3dbc7deee..e78103d45 100644 --- a/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/Libraries/Renderer/shims/ReactNativeTypes.js @@ -11,6 +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. */ import type React from 'react'; export type MeasureOnSuccessCallback = ( diff --git a/RNTester/js/ExampleTypes.js b/RNTester/js/ExampleTypes.js index 760b2396a..464363148 100644 --- a/RNTester/js/ExampleTypes.js +++ b/RNTester/js/ExampleTypes.js @@ -11,6 +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. */ import type React from 'react'; export type Example = { diff --git a/RNTester/js/ImageExample.js b/RNTester/js/ImageExample.js index 555e475e1..206aa4f23 100644 --- a/RNTester/js/ImageExample.js +++ b/RNTester/js/ImageExample.js @@ -98,6 +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. */ this.setState((state) => { return state.events = [...state.events, event]; }); diff --git a/RNTester/js/ModalExample.js b/RNTester/js/ModalExample.js index 6e3ac2c16..36d3c296f 100644 --- a/RNTester/js/ModalExample.js +++ b/RNTester/js/ModalExample.js @@ -52,6 +52,9 @@ class Button extends React.Component { onHideUnderlay={this._onUnhighlight} onPress={this.props.onPress} onShowUnderlay={this._onHighlight} + /* $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. */ style={[styles.button, this.props.style]} underlayColor="#a9d9d4"> {this.props.children} diff --git a/RNTester/js/TextInputExample.ios.js b/RNTester/js/TextInputExample.ios.js index 1a0ee5b15..c2b1e9306 100644 --- a/RNTester/js/TextInputExample.ios.js +++ b/RNTester/js/TextInputExample.ios.js @@ -310,6 +310,9 @@ class SelectionExample extends React.Component { 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. */ multiline={this.props.multiline} onChangeText={(value) => this.setState({value})} onSelectionChange={this.onSelectionChange.bind(this)} diff --git a/local-cli/server/server.js b/local-cli/server/server.js index 0a839c073..171125726 100644 --- a/local-cli/server/server.js +++ b/local-cli/server/server.js @@ -48,9 +48,7 @@ function server(argv: mixed, config: RNConfig, allArgs: Object) { type: 'initialize_packager_done', }); }; - - /* $FlowFixMe: we would have either to invariant() everything, or to - * auto-generate CLI args Flow types. */ + // $FlowFixMe: Remove me to see the error. const runServerArgs: RunServerArgs = args; /* $FlowFixMe: ConfigT shouldn't be extendable. */ const configT: ConfigT = config;