Skip to content

Commit bc658d3

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Spread TVViewProps into ViewProps instead of intersection
Reviewed By: yungsters Differential Revision: D7976556 fbshipit-source-id: ca2f6bcac249a937523c4b50add8960085a8be49
1 parent dbc9364 commit bc658d3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Libraries/Components/AppleTV/TVViewPropTypes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ const TVViewPropTypes = {
7171
tvParallaxMagnification: PropTypes.number,
7272
};
7373

74-
export type TVViewProps = {
74+
export type TVViewProps = $ReadOnly<{|
7575
isTVSelectable?: boolean,
7676
hasTVPreferredFocus?: boolean,
7777
tvParallaxProperties?: Object,
7878
tvParallaxShiftDistanceX?: number,
7979
tvParallaxShiftDistanceY?: number,
8080
tvParallaxTiltAngle?: number,
8181
tvParallaxMagnification?: number,
82-
};
82+
|}>;
8383

8484
module.exports = TVViewPropTypes;

Libraries/Components/View/ViewPropTypes.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
3535
export type ViewLayout = Layout;
3636
export type ViewLayoutEvent = LayoutEvent;
3737

38-
// There's no easy way to create a different type if (Platform.isTVOS):
39-
// so we must include TVViewProps
4038
export type ViewProps = {
39+
// There's no easy way to create a different type if (Platform.isTVOS):
40+
// so we must include TVViewProps
41+
...TVViewProps,
42+
4143
accessible?: boolean,
4244
accessibilityLabel?:
4345
| null
@@ -77,7 +79,7 @@ export type ViewProps = {
7779
shouldRasterizeIOS?: boolean,
7880
collapsable?: boolean,
7981
needsOffscreenAlphaCompositing?: boolean,
80-
} & TVViewProps;
82+
};
8183

8284
module.exports = {
8385
/**

0 commit comments

Comments
 (0)