diff --git a/Libraries/Animated/src/nodes/AnimatedInterpolation.js b/Libraries/Animated/src/nodes/AnimatedInterpolation.js index d3e29a54616..49bcca12f64 100644 --- a/Libraries/Animated/src/nodes/AnimatedInterpolation.js +++ b/Libraries/Animated/src/nodes/AnimatedInterpolation.js @@ -23,10 +23,6 @@ type ExtrapolateType = 'extend' | 'identity' | 'clamp'; export type InterpolationConfigType = { inputRange: $ReadOnlyArray, - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow - */ outputRange: $ReadOnlyArray | $ReadOnlyArray, easing?: (input: number) => number, extrapolate?: ExtrapolateType, @@ -222,11 +218,10 @@ function createInterpolationFromStringOutputRange( }); }); - /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to - * guard against this possibility. - */ const interpolations = outputRange[0] .match(stringShapeRegex) + /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need + * to guard against this possibility. */ .map((value, i) => { return createInterpolation({ ...config, @@ -363,6 +358,8 @@ class AnimatedInterpolation extends AnimatedWithChildren { return { inputRange: this._config.inputRange, // Only the `outputRange` can contain strings so we don't need to transform `inputRange` here + /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of + * v0.38.0. To see the error, remove this comment and run flow */ outputRange: this.__transformDataType(this._config.outputRange), extrapolateLeft: this._config.extrapolateLeft || this._config.extrapolate || 'extend', diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 42d9fe50e8b..334fc8246a0 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1152,6 +1152,8 @@ function InternalTextInput(props: Props): React.Node { onBlur={_onBlur} onChange={_onChange} onFocus={_onFocus} + /* $FlowFixMe the types for AndroidTextInput don't match up exactly + * with the props for TextInput. This will need to get fixed */ onScroll={_onScroll} onSelectionChange={_onSelectionChange} selection={selection} diff --git a/Libraries/Lists/FlatList.js b/Libraries/Lists/FlatList.js index c8f262c900b..9ce3a190e76 100644 --- a/Libraries/Lists/FlatList.js +++ b/Libraries/Lists/FlatList.js @@ -413,10 +413,10 @@ class FlatList extends React.PureComponent, void> { }), ); } else if (this.props.onViewableItemsChanged) { - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.63 was deployed. To see the error delete this - * comment and run Flow. */ this._virtualizedListPairs.push({ + /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.63 was deployed. To see the error delete + * this comment and run Flow. */ viewabilityConfig: this.props.viewabilityConfig, onViewableItemsChanged: this._createOnViewableItemsChanged( this.props.onViewableItemsChanged, diff --git a/Libraries/Lists/ViewabilityHelper.js b/Libraries/Lists/ViewabilityHelper.js index 1ea6b880dad..48425b00707 100644 --- a/Libraries/Lists/ViewabilityHelper.js +++ b/Libraries/Lists/ViewabilityHelper.js @@ -75,9 +75,6 @@ export type ViewabilityConfig = {| class ViewabilityHelper { _config: ViewabilityConfig; _hasInteracted: boolean = false; - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an error - * found when Flow v0.63 was deployed. To see the error delete this comment - * and run Flow. */ _timers: Set = new Set(); _viewableIndices: Array = []; _viewableItems: Map = new Map(); @@ -92,6 +89,9 @@ class ViewabilityHelper { * Cleanup, e.g. on unmount. Clears any pending timers. */ dispose() { + /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.63 was deployed. To see the error delete this + * comment and run Flow. */ this._timers.forEach(clearTimeout); } @@ -227,6 +227,9 @@ class ViewabilityHelper { this._viewableIndices = viewableIndices; if (this._config.minimumViewTime) { const handle = setTimeout(() => { + /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.63 was deployed. To see the error delete + * this comment and run Flow. */ this._timers.delete(handle); this._onUpdateSync( viewableIndices, @@ -234,6 +237,9 @@ class ViewabilityHelper { createViewToken, ); }, this._config.minimumViewTime); + /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.63 was deployed. To see the error delete this + * comment and run Flow. */ this._timers.add(handle); } else { this._onUpdateSync( diff --git a/Libraries/Lists/__flowtests__/FlatList-flowtest.js b/Libraries/Lists/__flowtests__/FlatList-flowtest.js index 5be4c1eebcd..912289cbf00 100644 --- a/Libraries/Lists/__flowtests__/FlatList-flowtest.js +++ b/Libraries/Lists/__flowtests__/FlatList-flowtest.js @@ -35,11 +35,11 @@ module.exports = { testBadDataWithTypicalItem(): React.Node { const data = [ { - // $FlowExpectedError - bad title type 6, should be string title: 6, key: 1, }, ]; + // $FlowExpectedError - bad title type 6, should be string return ; }, @@ -97,6 +97,7 @@ module.exports = { />, // EverythingIsFine } data={data} />, diff --git a/Libraries/Lists/__flowtests__/SectionList-flowtest.js b/Libraries/Lists/__flowtests__/SectionList-flowtest.js index 79a92a88a39..9425bacd5cf 100644 --- a/Libraries/Lists/__flowtests__/SectionList-flowtest.js +++ b/Libraries/Lists/__flowtests__/SectionList-flowtest.js @@ -57,8 +57,8 @@ module.exports = { }, ]; return [ - // $FlowExpectedError - title should be inside `item` } sections={sections} />, @@ -94,9 +94,6 @@ module.exports = { testBadSectionsShape(): React.Element<*> { const sections = [ - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.63 was deployed. To see the error delete this - * comment and run Flow. */ { key: 'a', items: [ @@ -115,7 +112,6 @@ module.exports = { const sections = [ { key: 'a', - // $FlowExpectedError - section has bad meta data `fooNumber` field of type string fooNumber: 'string', data: [ { @@ -129,6 +125,8 @@ module.exports = { ); diff --git a/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js b/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js index 88ee3374bde..3ca8ebfcd9e 100644 --- a/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +++ b/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js @@ -47,6 +47,9 @@ function LogBoxInspectorSourceMapStatus(props: Props): React.Node { animation, rotate: animated.interpolate({ inputRange: [0, 1], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment + * of v0.38.0. To see the error, remove this comment and run flow + */ outputRange: ['0deg', '360deg'], }), }); diff --git a/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js b/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js index 561cb144978..7d520156169 100644 --- a/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +++ b/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js @@ -66,8 +66,8 @@ module.exports = { textStyle, ): ImageStyleProp); + // $FlowExpectedError - Incompatible type. (StyleSheet.compose( - // $FlowExpectedError - Incompatible type. [textStyle], null, ): ImageStyleProp); diff --git a/RNTester/js/RNTesterApp.android.js b/RNTester/js/RNTesterApp.android.js index fd3655deec2..d7371b4ee6a 100644 --- a/RNTester/js/RNTesterApp.android.js +++ b/RNTester/js/RNTesterApp.android.js @@ -316,6 +316,8 @@ class RNTesterApp extends React.Component { /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found * when making Flow check .android.js files. */ this._exampleRef && + /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found + * when making Flow check .android.js files. */ this._exampleRef.handleBackAction && /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found * when making Flow check .android.js files. */ diff --git a/RNTester/js/examples/MaskedView/MaskedViewExample.js b/RNTester/js/examples/MaskedView/MaskedViewExample.js index d53359ff710..7ad01c6e41c 100644 --- a/RNTester/js/examples/MaskedView/MaskedViewExample.js +++ b/RNTester/js/examples/MaskedView/MaskedViewExample.js @@ -76,6 +76,9 @@ class AnimatedMaskExample extends React.Component { { rotate: this._maskRotateAnimatedValue.interpolate({ inputRange: [0, 360], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['0deg', '360deg'], }), }, diff --git a/RNTester/js/examples/NativeAnimation/NativeAnimationsExample.js b/RNTester/js/examples/NativeAnimation/NativeAnimationsExample.js index cd20cb7ca50..e6c4fcb591c 100644 --- a/RNTester/js/examples/NativeAnimation/NativeAnimationsExample.js +++ b/RNTester/js/examples/NativeAnimation/NativeAnimationsExample.js @@ -145,6 +145,9 @@ class LoopExample extends React.Component<{...}, $FlowFixMeState> { { opacity: this.state.value.interpolate({ inputRange: [0, 0.5, 1], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this comment + * and run flow */ outputRange: [0, 1, 0], }), }, @@ -240,6 +243,9 @@ class EventExample extends React.Component<{...}, $FlowFixMeState> { { rotate: this.state.anim.interpolate({ inputRange: [0, 1], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['0deg', '1deg'], }), }, diff --git a/RNTester/js/examples/ScrollView/ScrollViewAnimatedExample.js b/RNTester/js/examples/ScrollView/ScrollViewAnimatedExample.js index 0ca19402ab1..a4a5ffea339 100644 --- a/RNTester/js/examples/ScrollView/ScrollViewAnimatedExample.js +++ b/RNTester/js/examples/ScrollView/ScrollViewAnimatedExample.js @@ -39,10 +39,14 @@ class ScrollViewAnimatedExample extends Component<{...}> { render(): React.Node { const interpolated = this._scrollViewPos.interpolate({ inputRange: [0, 1], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of + * v0.38.0. To see the error, remove this comment and run flow */ outputRange: [0, 0.1], }); const interpolated2 = this._scrollViewPos.interpolate({ inputRange: [0, 1], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of + * v0.38.0. To see the error, remove this comment and run flow */ outputRange: ['0deg', '1deg'], }); return ( diff --git a/RNTester/js/examples/TextInput/TextInputExample.android.js b/RNTester/js/examples/TextInput/TextInputExample.android.js index f0d7be612fd..6306cd60387 100644 --- a/RNTester/js/examples/TextInput/TextInputExample.android.js +++ b/RNTester/js/examples/TextInput/TextInputExample.android.js @@ -114,6 +114,8 @@ class AutogrowingTextInputExample extends React.Component<{...}> { * found when making Flow check .android.js files. */ this.setState({contentSize: event.nativeEvent.contentSize}) } + /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was + * found when making Flow check .android.js files. */ {...props} /> Plain text value representation: diff --git a/RNTester/js/examples/Transform/TransformExample.js b/RNTester/js/examples/Transform/TransformExample.js index a824a706121..a42a00c1057 100644 --- a/RNTester/js/examples/Transform/TransformExample.js +++ b/RNTester/js/examples/Transform/TransformExample.js @@ -40,6 +40,9 @@ function AnimateTansformSingleProp() { { rotate: theta.interpolate({ inputRange: [0, 100], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['0deg', '360deg'], }), }, @@ -78,6 +81,9 @@ function Flip() { { rotateX: theta.interpolate({ inputRange: [0, 180], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['0deg', '180deg'], }), }, @@ -96,6 +102,9 @@ function Flip() { { rotateX: theta.interpolate({ inputRange: [0, 180], + /* $FlowFixMe(>=0.38.0) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['180deg', '360deg'], }), },