Skip to content

Commit

Permalink
Fix $FlowFixMes from TabBarIOS
Browse files Browse the repository at this point in the history
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 #16365

Differential Revision: D6200713

Pulled By: TheSavior

fbshipit-source-id: ecbd58d5831dd04250e794812ea03d202f777d12
  • Loading branch information
cdlewis authored and facebook-github-bot committed Nov 2, 2017
1 parent dd2fc40 commit cf8dc89
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Libraries/Components/TabBarIOS/TabBarIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>
);
}
Expand Down

0 comments on commit cf8dc89

Please sign in to comment.