Deploy v0.89

Reviewed By: jbrown215

Differential Revision: D13457087

fbshipit-source-id: 9f01371ae3515990c5595f1eb2361174050066b8
This commit is contained in:
glevi@fb.com 2018-12-14 13:54:52 -08:00 committed by Facebook Github Bot
parent ac30f64ae5
commit 24f8d4d3db
26 changed files with 247 additions and 30 deletions

View File

@ -97,4 +97,4 @@ untyped-import
untyped-type-import untyped-type-import
[version] [version]
^0.88.0 ^0.89.0

View File

@ -97,4 +97,4 @@ untyped-import
untyped-type-import untyped-type-import
[version] [version]
^0.88.0 ^0.89.0

View File

@ -110,10 +110,12 @@ const ActivityIndicator = (
); );
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ActivityIndicatorWithRef = React.forwardRef(ActivityIndicator); const ActivityIndicatorWithRef = React.forwardRef(ActivityIndicator);
ActivityIndicatorWithRef.displayName = 'ActivityIndicator'; ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
ActivityIndicatorWithRef.defaultProps = { ActivityIndicatorWithRef.defaultProps = {
animating: true, animating: true,
color: Platform.OS === 'ios' ? GRAY : null, color: Platform.OS === 'ios' ? GRAY : null,
@ -136,4 +138,7 @@ const styles = StyleSheet.create({
}, },
}); });
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
module.exports = (ActivityIndicatorWithRef: Class<NativeComponent<Props>>); module.exports = (ActivityIndicatorWithRef: Class<NativeComponent<Props>>);

View File

@ -190,9 +190,11 @@ const styles = StyleSheet.create({
*/ */
type CheckBoxType = Class<NativeComponent<Props>>; type CheckBoxType = Class<NativeComponent<Props>>;
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const CheckBoxWithRef = React.forwardRef(function CheckBoxWithRef(props, ref) { const CheckBoxWithRef = React.forwardRef(function CheckBoxWithRef(props, ref) {
return <CheckBox {...props} forwardedRef={ref} />; return <CheckBox {...props} forwardedRef={ref} />;
}); });
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (CheckBoxWithRef: CheckBoxType); module.exports = (CheckBoxWithRef: CheckBoxType);

View File

@ -89,15 +89,20 @@ const ProgressBarAndroid = (
return <AndroidProgressBar {...props} ref={forwardedRef} />; return <AndroidProgressBar {...props} ref={forwardedRef} />;
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid); const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
ProgressBarAndroidToExport.defaultProps = { ProgressBarAndroidToExport.defaultProps = {
styleAttr: 'Normal', styleAttr: 'Normal',
indeterminate: true, indeterminate: true,
animating: true, animating: true,
}; };
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (ProgressBarAndroidToExport: Class< module.exports = (ProgressBarAndroidToExport: Class<
NativeComponent<ProgressBarAndroidProps>, NativeComponent<ProgressBarAndroidProps>,
>); >);

View File

@ -80,7 +80,9 @@ const styles = StyleSheet.create({
}, },
}); });
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ProgressViewIOSWithRef = React.forwardRef(ProgressViewIOS); const ProgressViewIOSWithRef = React.forwardRef(ProgressViewIOS);
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (ProgressViewIOSWithRef: NativeProgressViewIOS); module.exports = (ProgressViewIOSWithRef: NativeProgressViewIOS);

View File

@ -403,8 +403,8 @@ export type Props = $ReadOnly<{|
* - `false`, deprecated, use 'never' instead * - `false`, deprecated, use 'never' instead
* - `true`, deprecated, use 'always' instead * - `true`, deprecated, use 'always' instead
*/ */
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an error /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.86 was deployed. To see the error, delete this comment * found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */ * and run Flow. */
keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | false | true), keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | false | true),
/** /**

View File

@ -127,7 +127,6 @@ const styles = StyleSheet.create({
}, },
}); });
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const SegmentedControlIOSWithRef = React.forwardRef( const SegmentedControlIOSWithRef = React.forwardRef(
( (
props: SegmentedControlIOSProps, props: SegmentedControlIOSProps,
@ -137,4 +136,7 @@ const SegmentedControlIOSWithRef = React.forwardRef(
}, },
); );
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (SegmentedControlIOSWithRef: NativeSegmentedControlIOS); module.exports = (SegmentedControlIOSWithRef: NativeSegmentedControlIOS);

View File

@ -250,9 +250,11 @@ const Slider = (
); );
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const SliderWithRef = React.forwardRef(Slider); const SliderWithRef = React.forwardRef(Slider);
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
SliderWithRef.defaultProps = { SliderWithRef.defaultProps = {
disabled: false, disabled: false,
value: 0, value: 0,
@ -274,4 +276,7 @@ if (Platform.OS === 'ios') {
}); });
} }
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
module.exports = (SliderWithRef: Class<ReactNative.NativeComponent<Props>>); module.exports = (SliderWithRef: Class<ReactNative.NativeComponent<Props>>);

View File

@ -236,7 +236,6 @@ class ToolbarAndroid extends React.Component<Props> {
} }
} }
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ToolbarAndroidToExport = React.forwardRef( const ToolbarAndroidToExport = React.forwardRef(
( (
props: ToolbarAndroidProps, props: ToolbarAndroidProps,
@ -246,6 +245,9 @@ const ToolbarAndroidToExport = React.forwardRef(
}, },
); );
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (ToolbarAndroidToExport: Class< module.exports = (ToolbarAndroidToExport: Class<
NativeComponent<ToolbarAndroidProps>, NativeComponent<ToolbarAndroidProps>,
>); >);

View File

@ -56,6 +56,9 @@ const TouchableBounce = ((createReactClass({
mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin], mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin],
propTypes: { propTypes: {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
...TouchableWithoutFeedback.propTypes, ...TouchableWithoutFeedback.propTypes,
// The function passed takes a callback to start the animation which should // The function passed takes a callback to start the animation which should
// be run after this onPress handler is done. You can use this (for example) // be run after this onPress handler is done. You can use this (for example)
@ -86,6 +89,9 @@ const TouchableBounce = ((createReactClass({
getInitialState: function(): State { getInitialState: function(): State {
return { return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(), ...this.touchableGetInitialState(),
scale: new Animated.Value(1), scale: new Animated.Value(1),
}; };
@ -181,13 +187,31 @@ const TouchableBounce = ((createReactClass({
nativeID={this.props.nativeID} nativeID={this.props.nativeID}
testID={this.props.testID} testID={this.props.testID}
hitSlop={this.props.hitSlop} hitSlop={this.props.hitSlop}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={ onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest this.touchableHandleResponderTerminationRequest
} }
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant} onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove} onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease} onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate}> onResponderTerminate={this.touchableHandleResponderTerminate}>
{this.props.children} {this.props.children}
{Touchable.renderDebugView({ {Touchable.renderDebugView({

View File

@ -155,6 +155,9 @@ type Props = $ReadOnly<{|
const TouchableHighlight = ((createReactClass({ const TouchableHighlight = ((createReactClass({
displayName: 'TouchableHighlight', displayName: 'TouchableHighlight',
propTypes: { propTypes: {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
...TouchableWithoutFeedback.propTypes, ...TouchableWithoutFeedback.propTypes,
/** /**
* Determines what the opacity of the wrapped view should be when touch is * Determines what the opacity of the wrapped view should be when touch is
@ -200,9 +203,15 @@ const TouchableHighlight = ((createReactClass({
getDefaultProps: () => DEFAULT_PROPS, getDefaultProps: () => DEFAULT_PROPS,
getInitialState: function() { getInitialState: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = false; this._isMounted = false;
if (this.props.testOnly_pressed) { if (this.props.testOnly_pressed) {
return { return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(), ...this.touchableGetInitialState(),
extraChildStyle: { extraChildStyle: {
opacity: this.props.activeOpacity, opacity: this.props.activeOpacity,
@ -213,6 +222,9 @@ const TouchableHighlight = ((createReactClass({
}; };
} else { } else {
return { return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(), ...this.touchableGetInitialState(),
extraChildStyle: null, extraChildStyle: null,
extraUnderlayStyle: null, extraUnderlayStyle: null,
@ -221,12 +233,21 @@ const TouchableHighlight = ((createReactClass({
}, },
componentDidMount: function() { componentDidMount: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = true; this._isMounted = true;
ensurePositiveDelayProps(this.props); ensurePositiveDelayProps(this.props);
}, },
componentWillUnmount: function() { componentWillUnmount: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = false; this._isMounted = false;
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout); clearTimeout(this._hideTimeout);
}, },
@ -244,13 +265,22 @@ const TouchableHighlight = ((createReactClass({
* defined on your component. * defined on your component.
*/ */
touchableHandleActivePressIn: function(e: PressEvent) { touchableHandleActivePressIn: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout); clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. 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);
}, },
touchableHandleActivePressOut: function(e: PressEvent) { touchableHandleActivePressOut: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
if (!this._hideTimeout) { if (!this._hideTimeout) {
this._hideUnderlay(); this._hideUnderlay();
} }
@ -272,9 +302,15 @@ const TouchableHighlight = ((createReactClass({
}, },
touchableHandlePress: function(e: PressEvent) { touchableHandlePress: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout); clearTimeout(this._hideTimeout);
if (!Platform.isTV) { if (!Platform.isTV) {
this._showUnderlay(); this._showUnderlay();
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
this._hideTimeout = setTimeout( this._hideTimeout = setTimeout(
this._hideUnderlay, this._hideUnderlay,
this.props.delayPressOut, this.props.delayPressOut,
@ -308,6 +344,9 @@ const TouchableHighlight = ((createReactClass({
}, },
_showUnderlay: function() { _showUnderlay: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
if (!this._isMounted || !this._hasPressHandler()) { if (!this._isMounted || !this._hasPressHandler()) {
return; return;
} }
@ -323,7 +362,13 @@ const TouchableHighlight = ((createReactClass({
}, },
_hideUnderlay: function() { _hideUnderlay: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout); clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._hideTimeout = null; this._hideTimeout = null;
if (this.props.testOnly_pressed) { if (this.props.testOnly_pressed) {
return; return;
@ -364,13 +409,31 @@ const TouchableHighlight = ((createReactClass({
isTVSelectable={true} isTVSelectable={true}
tvParallaxProperties={this.props.tvParallaxProperties} tvParallaxProperties={this.props.tvParallaxProperties}
hasTVPreferredFocus={this.props.hasTVPreferredFocus} hasTVPreferredFocus={this.props.hasTVPreferredFocus}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={ onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest this.touchableHandleResponderTerminationRequest
} }
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant} onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove} onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease} onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate} onResponderTerminate={this.touchableHandleResponderTerminate}
nativeID={this.props.nativeID} nativeID={this.props.nativeID}
testID={this.props.testID}> testID={this.props.testID}>

View File

@ -75,6 +75,9 @@ const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
const TouchableNativeFeedback = createReactClass({ const TouchableNativeFeedback = createReactClass({
displayName: 'TouchableNativeFeedback', displayName: 'TouchableNativeFeedback',
propTypes: { propTypes: {
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the
* error, delete this comment and run Flow. */
...TouchableWithoutFeedback.propTypes, ...TouchableWithoutFeedback.propTypes,
/** /**
@ -107,7 +110,10 @@ const TouchableNativeFeedback = createReactClass({
* Creates an object that represents android theme's default background for * Creates an object that represents android theme's default background for
* selectable elements (?android:attr/selectableItemBackground). * selectable elements (?android:attr/selectableItemBackground).
*/ */
SelectableBackground: function() { SelectableBackground: function(): {
type: 'ThemeAttrAndroid',
attribute: 'selectableItemBackground',
} {
return {type: 'ThemeAttrAndroid', attribute: 'selectableItemBackground'}; return {type: 'ThemeAttrAndroid', attribute: 'selectableItemBackground'};
}, },
/** /**
@ -115,7 +121,10 @@ const TouchableNativeFeedback = createReactClass({
* selectable elements (?android:attr/selectableItemBackgroundBorderless). * selectable elements (?android:attr/selectableItemBackgroundBorderless).
* Available on android API level 21+. * Available on android API level 21+.
*/ */
SelectableBackgroundBorderless: function() { SelectableBackgroundBorderless: function(): {
type: 'ThemeAttrAndroid',
attribute: 'selectableItemBackgroundBorderless',
} {
return { return {
type: 'ThemeAttrAndroid', type: 'ThemeAttrAndroid',
attribute: 'selectableItemBackgroundBorderless', attribute: 'selectableItemBackgroundBorderless',
@ -131,7 +140,14 @@ const TouchableNativeFeedback = createReactClass({
* @param color The ripple color * @param color The ripple color
* @param borderless If the ripple can render outside it's bounds * @param borderless If the ripple can render outside it's bounds
*/ */
Ripple: function(color: string, borderless: boolean) { Ripple: function(
color: string,
borderless: boolean,
): {
type: 'RippleAndroid',
color: ?number,
borderless: boolean,
} {
return { return {
type: 'RippleAndroid', type: 'RippleAndroid',
color: processColor(color), color: processColor(color),
@ -139,7 +155,7 @@ const TouchableNativeFeedback = createReactClass({
}; };
}, },
canUseNativeForeground: function() { canUseNativeForeground: function(): boolean {
return Platform.OS === 'android' && Platform.Version >= 23; return Platform.OS === 'android' && Platform.Version >= 23;
}, },
}, },
@ -171,9 +187,18 @@ const TouchableNativeFeedback = createReactClass({
touchableHandleActivePressIn: function(e: PressEvent) { touchableHandleActivePressIn: function(e: PressEvent) {
this.props.onPressIn && this.props.onPressIn(e); this.props.onPressIn && this.props.onPressIn(e);
this._dispatchPressedStateChange(true); this._dispatchPressedStateChange(true);
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the
* error, delete this comment and run Flow. */
if (this.pressInLocation) { if (this.pressInLocation) {
this._dispatchHotspotUpdate( this._dispatchHotspotUpdate(
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the
* error, delete this comment and run Flow. */
this.pressInLocation.locationX, this.pressInLocation.locationX,
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the
* error, delete this comment and run Flow. */
this.pressInLocation.locationY, this.pressInLocation.locationY,
); );
} }

View File

@ -135,6 +135,9 @@ const TouchableOpacity = ((createReactClass({
mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin], mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin],
propTypes: { propTypes: {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
...TouchableWithoutFeedback.propTypes, ...TouchableWithoutFeedback.propTypes,
/** /**
* Determines what the opacity of the wrapped view should be when touch is * Determines what the opacity of the wrapped view should be when touch is
@ -159,7 +162,13 @@ const TouchableOpacity = ((createReactClass({
getInitialState: function() { getInitialState: function() {
return { return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(), ...this.touchableGetInitialState(),
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
anim: new Animated.Value(this._getChildStyleOpacityWithDefault()), anim: new Animated.Value(this._getChildStyleOpacityWithDefault()),
}; };
}, },
@ -257,6 +266,9 @@ const TouchableOpacity = ((createReactClass({
}, },
_opacityInactive: function(duration: number) { _opacityInactive: function(duration: number) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this.setOpacityTo(this._getChildStyleOpacityWithDefault(), duration); this.setOpacityTo(this._getChildStyleOpacityWithDefault(), duration);
}, },
@ -281,13 +293,31 @@ const TouchableOpacity = ((createReactClass({
hasTVPreferredFocus={this.props.hasTVPreferredFocus} hasTVPreferredFocus={this.props.hasTVPreferredFocus}
tvParallaxProperties={this.props.tvParallaxProperties} tvParallaxProperties={this.props.tvParallaxProperties}
hitSlop={this.props.hitSlop} hitSlop={this.props.hitSlop}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={ onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest this.touchableHandleResponderTerminationRequest
} }
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant} onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove} onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease} onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate}> onResponderTerminate={this.touchableHandleResponderTerminate}>
{this.props.children} {this.props.children}
{Touchable.renderDebugView({ {Touchable.renderDebugView({

View File

@ -47,7 +47,6 @@ if (__DEV__) {
</TextAncestor.Consumer> </TextAncestor.Consumer>
); );
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
ViewToExport = React.forwardRef(View); ViewToExport = React.forwardRef(View);
ViewToExport.displayName = 'View'; ViewToExport.displayName = 'View';
} }

View File

@ -16,6 +16,9 @@ const requireNativeComponent = require('requireNativeComponent');
import type {ViewProps} from 'ViewPropTypes'; import type {ViewProps} from 'ViewPropTypes';
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
type ViewNativeComponentType = Class<ReactNative.NativeComponent<ViewProps>>; type ViewNativeComponentType = Class<ReactNative.NativeComponent<ViewProps>>;
const NativeViewComponent = requireNativeComponent('RCTView'); const NativeViewComponent = requireNativeComponent('RCTView');

View File

@ -258,7 +258,6 @@ let Image = (
); );
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
Image = React.forwardRef(Image); Image = React.forwardRef(Image);
/** /**
@ -266,6 +265,9 @@ Image = React.forwardRef(Image);
* *
* See https://facebook.github.io/react-native/docs/image.html#getsize * See https://facebook.github.io/react-native/docs/image.html#getsize
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.getSize = getSize; Image.getSize = getSize;
/** /**
@ -274,6 +276,9 @@ Image.getSize = getSize;
* *
* See https://facebook.github.io/react-native/docs/image.html#prefetch * See https://facebook.github.io/react-native/docs/image.html#prefetch
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.prefetch = prefetch; Image.prefetch = prefetch;
/** /**
@ -281,6 +286,9 @@ Image.prefetch = prefetch;
* *
* See https://facebook.github.io/react-native/docs/image.html#abortprefetch * See https://facebook.github.io/react-native/docs/image.html#abortprefetch
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.abortPrefetch = abortPrefetch; Image.abortPrefetch = abortPrefetch;
/** /**
@ -288,6 +296,9 @@ Image.abortPrefetch = abortPrefetch;
* *
* See https://facebook.github.io/react-native/docs/image.html#querycache * See https://facebook.github.io/react-native/docs/image.html#querycache
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.queryCache = queryCache; Image.queryCache = queryCache;
/** /**
@ -295,8 +306,14 @@ Image.queryCache = queryCache;
* *
* See https://facebook.github.io/react-native/docs/image.html#resolveassetsource * See https://facebook.github.io/react-native/docs/image.html#resolveassetsource
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.resolveAssetSource = resolveAssetSource; Image.resolveAssetSource = resolveAssetSource;
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.propTypes = ImageProps; Image.propTypes = ImageProps;
const styles = StyleSheet.create({ const styles = StyleSheet.create({
@ -305,4 +322,7 @@ const styles = StyleSheet.create({
}, },
}); });
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (Image: Class<ImageComponentType>); module.exports = (Image: Class<ImageComponentType>);

View File

@ -122,7 +122,6 @@ let Image = (
); );
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
Image = React.forwardRef(Image); Image = React.forwardRef(Image);
/** /**
@ -130,6 +129,9 @@ Image = React.forwardRef(Image);
* *
* See https://facebook.github.io/react-native/docs/image.html#getsize * See https://facebook.github.io/react-native/docs/image.html#getsize
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.getSize = getSize; Image.getSize = getSize;
/** /**
@ -138,6 +140,9 @@ Image.getSize = getSize;
* *
* See https://facebook.github.io/react-native/docs/image.html#prefetch * See https://facebook.github.io/react-native/docs/image.html#prefetch
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.prefetch = prefetch; Image.prefetch = prefetch;
/** /**
@ -145,6 +150,9 @@ Image.prefetch = prefetch;
* *
* See https://facebook.github.io/react-native/docs/image.html#querycache * See https://facebook.github.io/react-native/docs/image.html#querycache
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.queryCache = queryCache; Image.queryCache = queryCache;
/** /**
@ -152,8 +160,14 @@ Image.queryCache = queryCache;
* *
* See https://facebook.github.io/react-native/docs/image.html#resolveassetsource * See https://facebook.github.io/react-native/docs/image.html#resolveassetsource
*/ */
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.resolveAssetSource = resolveAssetSource; Image.resolveAssetSource = resolveAssetSource;
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
Image.propTypes = DeprecatedImagePropType; Image.propTypes = DeprecatedImagePropType;
const styles = StyleSheet.create({ const styles = StyleSheet.create({
@ -162,4 +176,7 @@ const styles = StyleSheet.create({
}, },
}); });
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (Image: Class<ImageComponentType>); module.exports = (Image: Class<ImageComponentType>);

View File

@ -1732,6 +1732,9 @@ class CellRenderer extends React.Component<
: inversionStyle; : inversionStyle;
if (!CellRendererComponent) { if (!CellRendererComponent) {
return ( return (
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
<View style={cellStyle} onLayout={onLayout}> <View style={cellStyle} onLayout={onLayout}>
{element} {element}
{itemSeparator} {itemSeparator}

View File

@ -505,6 +505,9 @@ class ItemWithSeparator extends React.Component<
<SeparatorComponent {...this.state.separatorProps} /> <SeparatorComponent {...this.state.separatorProps} />
); );
return leadingSeparator || separator ? ( return leadingSeparator || separator ? (
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
<View> <View>
{leadingSeparator} {leadingSeparator}
{element} {element}

View File

@ -277,11 +277,16 @@ const Text = (
) => { ) => {
return <TouchableText {...props} forwardedRef={forwardedRef} />; return <TouchableText {...props} forwardedRef={forwardedRef} />;
}; };
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const TextToExport = React.forwardRef(Text); const TextToExport = React.forwardRef(Text);
TextToExport.displayName = 'Text'; TextToExport.displayName = 'Text';
// TODO: Deprecate this. // TODO: Deprecate this.
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
TextToExport.propTypes = DeprecatedTextPropTypes; TextToExport.propTypes = DeprecatedTextPropTypes;
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
module.exports = (TextToExport: Class<NativeComponent<TextProps>>); module.exports = (TextToExport: Class<NativeComponent<TextProps>>);

View File

@ -56,7 +56,6 @@ describe('setAndForwardRef', () => {
} }
} }
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const TestComponentWithRef = React.forwardRef((props, ref) => ( const TestComponentWithRef = React.forwardRef((props, ref) => (
<TestComponent {...props} forwardedRef={ref} /> <TestComponent {...props} forwardedRef={ref} />
)); ));
@ -86,6 +85,9 @@ describe('setAndForwardRef', () => {
it('should forward refs (createRef-based)', () => { it('should forward refs (createRef-based)', () => {
const createdRef = React.createRef<typeof ForwardedComponent>(); const createdRef = React.createRef<typeof ForwardedComponent>();
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
ReactTestRenderer.create(<TestComponentWithRef ref={createdRef} />); ReactTestRenderer.create(<TestComponentWithRef ref={createdRef} />);
/* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an /* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an

View File

@ -10,13 +10,13 @@
'use strict'; 'use strict';
/* $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'; import type React from 'react';
export type Example = { export type Example = {
title: string, title: string,
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.89 was deployed. To see the error, delete this comment
* and run Flow. */
render: () => ?React.Element<any>, render: () => ?React.Element<any>,
description?: string, description?: string,
platform?: string, platform?: string,

View File

@ -214,8 +214,8 @@
"@reactions/component": "^2.0.2", "@reactions/component": "^2.0.2",
"async": "^2.4.0", "async": "^2.4.0",
"babel-eslint": "9.0.0", "babel-eslint": "9.0.0",
"detox": "9.0.4",
"coveralls": "^3.0.2", "coveralls": "^3.0.2",
"detox": "9.0.4",
"eslint": "5.1.0", "eslint": "5.1.0",
"eslint-config-fb-strict": "22.1.0", "eslint-config-fb-strict": "22.1.0",
"eslint-config-fbjs": "2.0.1", "eslint-config-fbjs": "2.0.1",
@ -225,7 +225,7 @@
"eslint-plugin-prettier": "2.6.0", "eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react": "7.8.2", "eslint-plugin-react": "7.8.2",
"eslint-plugin-react-native": "3.5.0", "eslint-plugin-react-native": "3.5.0",
"flow-bin": "^0.88.0", "flow-bin": "^0.89.0",
"jest": "24.0.0-alpha.6", "jest": "24.0.0-alpha.6",
"jest-junit": "5.2.0", "jest-junit": "5.2.0",
"prettier": "1.13.6", "prettier": "1.13.6",

View File

@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version] [version]
^0.88.0 ^0.89.0

View File

@ -2778,10 +2778,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2" graceful-fs "^4.1.2"
write "^0.2.1" write "^0.2.1"
flow-bin@^0.88.0: flow-bin@^0.89.0:
version "0.88.0" version "0.89.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.88.0.tgz#e4c7bd93da2331f6ac1733fbe484b1b0c52eb548" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.89.0.tgz#6bd29c2af7e0f429797f820662f33749105c32fa"
integrity sha512-SnUCuhHP0JZaXQ83w4iTthfTInAg8DIBZCo1xIqDhFmQ6XNEMYMwYhPoMQyELRrkbTpyCYmf4g93y0UQw0dibw== integrity sha512-DkO4PsXYrl53V6G5+t5HbRMC5ajYUQej2LEGPUZ+j9okTb41Sn5j9vfxsCpXMEAslYnQoysHhYu4GUZsQX/DrQ==
for-in@^1.0.1, for-in@^1.0.2: for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2" version "1.0.2"