Typing View style as ViewStyleProp

Summary: Locking down view style so that invalid styles can't be passed into View.

Reviewed By: yungsters

Differential Revision: D9309097

fbshipit-source-id: 69e7e3c5626609cfd47c167027a55470c42228c8
This commit is contained in:
Eli White
2018-08-14 16:31:04 -07:00
committed by Facebook Github Bot
parent 22cf5dc566
commit 76948ad1bd
15 changed files with 70 additions and 57 deletions

View File

@@ -33,6 +33,7 @@ import type {
import type {EdgeInsetsProp} from 'EdgeInsetsPropType';
import type {TVViewProps} from 'TVViewPropTypes';
import type {Layout, LayoutEvent} from 'CoreEventTypes';
import type {ViewStyleProp} from 'StyleSheet';
const stylePropType = StyleSheetPropType(ViewStylePropTypes);
@@ -103,7 +104,7 @@ export type ViewProps = $ReadOnly<{|
nativeID?: string,
hitSlop?: ?EdgeInsetsProp,
pointerEvents?: null | 'box-none' | 'none' | 'box-only' | 'auto',
style?: stylePropType,
style?: ?ViewStyleProp,
removeClippedSubviews?: boolean,
renderToHardwareTextureAndroid?: boolean,
shouldRasterizeIOS?: boolean,