Permalink
Browse files

Make ViewProps Exact

Reviewed By: yungsters

Differential Revision: D7976755

fbshipit-source-id: f6a0da1023a9235763c7ecb3ca7a9238887d0471
  • Loading branch information...
TheSavior authored and facebook-github-bot committed May 12, 2018
1 parent bc658d3 commit 65c336f38f4afd43c8b5f81745abf38bd9b8ddbf
@@ -17,7 +17,9 @@ const requireNativeComponent = require('requireNativeComponent');
import type {ViewProps} from 'ViewPropTypes';
type Props = ViewProps & {
type Props = {
...ViewProps,
children: any,
/**
* Should be a React element to be rendered and applied as the
@@ -22,19 +22,20 @@ const requireNativeComponent = require('requireNativeComponent');
import type {DangerouslyImpreciseStyleProp} from 'StyleSheet';
import type {ViewProps} from 'ViewPropTypes';
class TabBarIOS extends React.Component<
ViewProps & {
style?: DangerouslyImpreciseStyleProp,
unselectedTintColor?: string,
tintColor?: string,
unselectedItemTintColor?: string,
barTintColor?: string,
barStyle?: 'default' | 'black',
translucent?: boolean,
itemPositioning?: 'fill' | 'center' | 'auto',
children: React.Node,
},
> {
type Props = $ReadOnly<{|
...ViewProps,
style?: DangerouslyImpreciseStyleProp,
unselectedTintColor?: string,
tintColor?: string,
unselectedItemTintColor?: string,
barTintColor?: string,
barStyle?: 'default' | 'black',
translucent?: boolean,
itemPositioning?: 'fill' | 'center' | 'auto',
children: React.Node,
|}>;
class TabBarIOS extends React.Component<Props> {
static Item = TabBarItemIOS;
static propTypes = {
@@ -35,7 +35,7 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
export type ViewLayout = Layout;
export type ViewLayoutEvent = LayoutEvent;
export type ViewProps = {
export type ViewProps = $ReadOnly<{|
// There's no easy way to create a different type if (Platform.isTVOS):
// so we must include TVViewProps
...TVViewProps,
@@ -79,7 +79,7 @@ export type ViewProps = {
shouldRasterizeIOS?: boolean,
collapsable?: boolean,
needsOffscreenAlphaCompositing?: boolean,
};
|}>;
module.exports = {
/**

0 comments on commit 65c336f

Please sign in to comment.