Skip to content
Permalink
Browse files

Spread TVViewProps into ViewProps instead of intersection

Reviewed By: yungsters

Differential Revision: D7976556

fbshipit-source-id: ca2f6bcac249a937523c4b50add8960085a8be49
  • Loading branch information...
TheSavior authored and facebook-github-bot committed May 12, 2018
1 parent dbc9364 commit bc658d3c4405676643d952a126295dbc7fc26217
Showing with 7 additions and 5 deletions.
  1. +2 −2 Libraries/Components/AppleTV/TVViewPropTypes.js
  2. +5 −3 Libraries/Components/View/ViewPropTypes.js
@@ -71,14 +71,14 @@ const TVViewPropTypes = {
tvParallaxMagnification: PropTypes.number,
};

export type TVViewProps = {
export type TVViewProps = $ReadOnly<{|
isTVSelectable?: boolean,
hasTVPreferredFocus?: boolean,
tvParallaxProperties?: Object,
tvParallaxShiftDistanceX?: number,
tvParallaxShiftDistanceY?: number,
tvParallaxTiltAngle?: number,
tvParallaxMagnification?: number,
};
|}>;

module.exports = TVViewPropTypes;
@@ -35,9 +35,11 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
export type ViewLayout = Layout;
export type ViewLayoutEvent = LayoutEvent;

// There's no easy way to create a different type if (Platform.isTVOS):
// so we must include TVViewProps
export type ViewProps = {
// There's no easy way to create a different type if (Platform.isTVOS):
// so we must include TVViewProps
...TVViewProps,

accessible?: boolean,
accessibilityLabel?:
| null
@@ -77,7 +79,7 @@ export type ViewProps = {
shouldRasterizeIOS?: boolean,
collapsable?: boolean,
needsOffscreenAlphaCompositing?: boolean,
} & TVViewProps;
};

module.exports = {
/**

0 comments on commit bc658d3

Please sign in to comment.
You can’t perform that action at this time.