mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Upgrade Flow to v0.56.0
Reviewed By: calebmer Differential Revision: D5958715 fbshipit-source-id: 7feda03a9540e69bf8d9b4eb89720248ff43294f
This commit is contained in:
committed by
Facebook Github Bot
parent
f368287347
commit
a16ef18a80
@@ -912,7 +912,6 @@ if (Platform.OS === 'android') {
|
||||
(ScrollView: React.ComponentType<any>),
|
||||
nativeOnlyProps,
|
||||
);
|
||||
// $FlowFixMe (bvaughn) Update ComponentInterface in ViewPropTypes to include a string type (for Fiber host components) in a follow-up.
|
||||
RCTScrollContentView = requireNativeComponent('RCTScrollContentView', View);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,6 +232,12 @@ if (__DEV__) {
|
||||
|
||||
// Set up inspector
|
||||
const JSInspector = require('JSInspector');
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error found when Flow v0.56 was deployed. To see the error
|
||||
* delete this comment and run Flow. */
|
||||
JSInspector.registerAgent(require('NetworkAgent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,6 @@ class ImageBackground extends React.Component<$FlowFixMeProps> {
|
||||
_viewRef: ?NativeMethodsMixinType = null;
|
||||
|
||||
_captureRef = ref => {
|
||||
/* $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;
|
||||
};
|
||||
|
||||
|
||||
@@ -375,18 +375,12 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
*/
|
||||
getScrollResponder() {
|
||||
if (this._scrollRef && this._scrollRef.getScrollResponder) {
|
||||
/* $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,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);
|
||||
@@ -395,9 +389,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
|
||||
setNativeProps(props: Object) {
|
||||
if (this._scrollRef) {
|
||||
/* $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);
|
||||
}
|
||||
}
|
||||
@@ -636,9 +627,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
<ListHeaderComponent />
|
||||
);
|
||||
cells.push(
|
||||
/* $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. */
|
||||
<View
|
||||
key="$header"
|
||||
onLayout={this._onLayoutHeader}
|
||||
@@ -747,9 +735,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
<ListEmptyComponent />
|
||||
);
|
||||
cells.push(
|
||||
/* $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. */
|
||||
<View
|
||||
key="$empty"
|
||||
onLayout={this._onLayoutEmpty}
|
||||
@@ -766,9 +751,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
<ListFooterComponent />
|
||||
);
|
||||
cells.push(
|
||||
/* $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. */
|
||||
<View
|
||||
key="$footer"
|
||||
onLayout={this._onLayoutFooter}
|
||||
|
||||
@@ -32,6 +32,12 @@ class StyleSheetValidation {
|
||||
var message1 = '"' + prop + '" is not a valid style property.';
|
||||
var message2 = '\nValid style props: ' +
|
||||
JSON.stringify(Object.keys(allStylePropTypes).sort(), null, ' ');
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This
|
||||
* comment suppresses an error found when Flow v0.56 was deployed. To see
|
||||
* the error delete this comment and run Flow. */
|
||||
styleError(message1, style, caller, message2);
|
||||
}
|
||||
var error = allStylePropTypes[prop](
|
||||
@@ -43,6 +49,12 @@ class StyleSheetValidation {
|
||||
ReactPropTypesSecret,
|
||||
);
|
||||
if (error) {
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This
|
||||
* comment suppresses an error found when Flow v0.56 was deployed. To see
|
||||
* the error delete this comment and run Flow. */
|
||||
styleError(error.message, style, caller);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user