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:
Chris Lewis 2017-11-01 19:14:03 -07:00 committed by Facebook Github Bot
parent dd2fc4022e
commit cf8dc89ee8
1 changed files with 11 additions and 10 deletions

View File

@ -20,19 +20,22 @@ const ViewPropTypes = require('ViewPropTypes');
var requireNativeComponent = require('requireNativeComponent');
class TabBarIOS extends React.Component<{
style?: $FlowFixMe,
unselectedTintColor?: $FlowFixMe,
tintColor?: $FlowFixMe,
unselectedItemTintColor?: $FlowFixMe,
barTintColor?: $FlowFixMe,
import type {StyleObj} from 'StyleSheetTypes';
import type {ViewProps} from 'ViewPropTypes';
class TabBarIOS extends React.Component<ViewProps & {
style?: StyleObj,
unselectedTintColor?: string,
tintColor?: string,
unselectedItemTintColor?: string,
barTintColor?: string,
barStyle?: 'default' | 'black',
translucent?: boolean,
itemPositioning?: 'fill' | 'center' | 'auto',
children: React.Node,
}> {
static Item = TabBarItemIOS;
// $FlowFixMe(>=0.41.0)
static propTypes = {
...ViewPropTypes,
style: ViewPropTypes.style,
@ -85,9 +88,7 @@ class TabBarIOS extends React.Component<{
barStyle={this.props.barStyle}
itemPositioning={this.props.itemPositioning}
translucent={this.props.translucent !== false}>
{
// $FlowFixMe found when converting React.createClass to ES6
this.props.children}
{this.props.children}
</RCTTabBar>
);
}