diff --git a/Libraries/Components/MaskedView/MaskedViewIOS.ios.js b/Libraries/Components/MaskedView/MaskedViewIOS.ios.js index 9f24f4edcf8c53..b0d1ab490a98e7 100644 --- a/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +++ b/Libraries/Components/MaskedView/MaskedViewIOS.ios.js @@ -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 diff --git a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js index 686483f3b23219..42d6cb238e90f6 100644 --- a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js +++ b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js @@ -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 { static Item = TabBarItemIOS; static propTypes = { diff --git a/Libraries/Components/View/ViewPropTypes.js b/Libraries/Components/View/ViewPropTypes.js index 61406b2ca4f6ba..1d5f193c62de9e 100644 --- a/Libraries/Components/View/ViewPropTypes.js +++ b/Libraries/Components/View/ViewPropTypes.js @@ -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 = { /**