mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-07 23:27:05 +08:00
Add flow suppressions to xplat android
Summary: .android.js files may be checked (when the next version of flow is released) by using `flow start --flowconfig-name .flowconfig.android` and `flow status --flowconfig-name .flowconfig.android` This diff adds suppressions to the errors that are in .android.js files, which flow does not check right now. When site is `react_native_fb` or `react_native_android_fb`, error will be suppressed when checking with .flowconfig.android When site is `react_native_fb` or `react_native_ios_fb`, error will be suppressed when checking with .flowconfig. You can use `react_native_fb` when it should be suppressed for both. The controller you requested could not be found. Reviewed By: TheSavior Differential Revision: D9122178 fbshipit-source-id: 0ec9d3cae3d887f58645e6585b2a3f6c3889b13e
This commit is contained in:
committed by
Facebook Github Bot
parent
35bd17f1d6
commit
f125815efc
@@ -82,6 +82,8 @@ class ViewPagerAndroid extends React.Component<{
|
||||
keyboardDismissMode?: 'none' | 'on-drag',
|
||||
scrollEnabled?: boolean,
|
||||
}> {
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
||||
* when making Flow check .android.js files. */
|
||||
static propTypes = {
|
||||
...ViewPropTypes,
|
||||
/**
|
||||
@@ -154,14 +156,20 @@ class ViewPagerAndroid extends React.Component<{
|
||||
}
|
||||
}
|
||||
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
||||
* when making Flow check .android.js files. */
|
||||
getInnerViewNode = (): ReactComponent => {
|
||||
return this.refs[VIEWPAGER_REF].getInnerViewNode();
|
||||
};
|
||||
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
||||
* when making Flow check .android.js files. */
|
||||
_childrenWithOverridenStyle = (): Array => {
|
||||
// Override styles so that each page will fill the parent. Native component
|
||||
// will handle positioning of elements, so it's not important to offset
|
||||
// them correctly.
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
||||
* when making Flow check .android.js files. */
|
||||
return React.Children.map(this.props.children, function(child) {
|
||||
if (!child) {
|
||||
return null;
|
||||
@@ -247,6 +255,8 @@ class ViewPagerAndroid extends React.Component<{
|
||||
<NativeAndroidViewPager
|
||||
{...this.props}
|
||||
ref={VIEWPAGER_REF}
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
* found when making Flow check .android.js files. */
|
||||
style={this.props.style}
|
||||
onPageScroll={this._onPageScroll}
|
||||
onPageScrollStateChanged={this._onPageScrollStateChanged}
|
||||
|
||||
Reference in New Issue
Block a user