Fix $FlowFixMes from TabBarIOS
Summary: There are a number of $FlowFixMe statements in TarBarIOS.ios.js as a result of recent Flow upgrades introducing new errors/warnings. I had a stab at removing these statements and introducing what are hopefully sensible types. Only types were changed so `yarn flow` should be sufficient. [INTERNAL] [MINOR] [TarBarIOS] - |Fix $FlowFixMes| Closes https://github.com/facebook/react-native/pull/16365 Differential Revision: D6200713 Pulled By: TheSavior fbshipit-source-id: ecbd58d5831dd04250e794812ea03d202f777d12
This commit is contained in:
parent
dd2fc4022e
commit
cf8dc89ee8
|
@ -20,19 +20,22 @@ const ViewPropTypes = require('ViewPropTypes');
|
||||||
|
|
||||||
var requireNativeComponent = require('requireNativeComponent');
|
var requireNativeComponent = require('requireNativeComponent');
|
||||||
|
|
||||||
class TabBarIOS extends React.Component<{
|
import type {StyleObj} from 'StyleSheetTypes';
|
||||||
style?: $FlowFixMe,
|
import type {ViewProps} from 'ViewPropTypes';
|
||||||
unselectedTintColor?: $FlowFixMe,
|
|
||||||
tintColor?: $FlowFixMe,
|
class TabBarIOS extends React.Component<ViewProps & {
|
||||||
unselectedItemTintColor?: $FlowFixMe,
|
style?: StyleObj,
|
||||||
barTintColor?: $FlowFixMe,
|
unselectedTintColor?: string,
|
||||||
|
tintColor?: string,
|
||||||
|
unselectedItemTintColor?: string,
|
||||||
|
barTintColor?: string,
|
||||||
barStyle?: 'default' | 'black',
|
barStyle?: 'default' | 'black',
|
||||||
translucent?: boolean,
|
translucent?: boolean,
|
||||||
itemPositioning?: 'fill' | 'center' | 'auto',
|
itemPositioning?: 'fill' | 'center' | 'auto',
|
||||||
|
children: React.Node,
|
||||||
}> {
|
}> {
|
||||||
static Item = TabBarItemIOS;
|
static Item = TabBarItemIOS;
|
||||||
|
|
||||||
// $FlowFixMe(>=0.41.0)
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
...ViewPropTypes,
|
...ViewPropTypes,
|
||||||
style: ViewPropTypes.style,
|
style: ViewPropTypes.style,
|
||||||
|
@ -85,9 +88,7 @@ class TabBarIOS extends React.Component<{
|
||||||
barStyle={this.props.barStyle}
|
barStyle={this.props.barStyle}
|
||||||
itemPositioning={this.props.itemPositioning}
|
itemPositioning={this.props.itemPositioning}
|
||||||
translucent={this.props.translucent !== false}>
|
translucent={this.props.translucent !== false}>
|
||||||
{
|
{this.props.children}
|
||||||
// $FlowFixMe found when converting React.createClass to ES6
|
|
||||||
this.props.children}
|
|
||||||
</RCTTabBar>
|
</RCTTabBar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue