diff --git a/Libraries/Components/AppleTV/TVViewPropTypes.js b/Libraries/Components/AppleTV/TVViewPropTypes.js index 656450df247aea..5bda1f618c5440 100644 --- a/Libraries/Components/AppleTV/TVViewPropTypes.js +++ b/Libraries/Components/AppleTV/TVViewPropTypes.js @@ -71,7 +71,7 @@ const TVViewPropTypes = { tvParallaxMagnification: PropTypes.number, }; -export type TVViewProps = { +export type TVViewProps = $ReadOnly<{| isTVSelectable?: boolean, hasTVPreferredFocus?: boolean, tvParallaxProperties?: Object, @@ -79,6 +79,6 @@ export type TVViewProps = { tvParallaxShiftDistanceY?: number, tvParallaxTiltAngle?: number, tvParallaxMagnification?: number, -}; +|}>; module.exports = TVViewPropTypes; diff --git a/Libraries/Components/View/ViewPropTypes.js b/Libraries/Components/View/ViewPropTypes.js index 946368f267de91..61406b2ca4f6ba 100644 --- a/Libraries/Components/View/ViewPropTypes.js +++ b/Libraries/Components/View/ViewPropTypes.js @@ -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 = { /**