RN: Improve ViewPropTypes

Summary:
Makes a couple improvements to `ViewPropTypes`.

- Remove deprecated transform props. We are now using exact object types, so they are already disallowed.
- Remove garbage types for `accessibilityLabel`.

Reviewed By: TheSavior

Differential Revision: D9542088

fbshipit-source-id: f9128353e19cff22caf52c896c9c137f01aea276
This commit is contained in:
Tim Yung 2018-08-29 17:34:14 -07:00 committed by Facebook Github Bot
parent 6a1f48e06d
commit 19a8a578dc
1 changed files with 1 additions and 18 deletions

View File

@ -60,17 +60,6 @@ type GestureResponderEventProps = $ReadOnly<{|
type AndroidViewProps = $ReadOnly<{|
nativeBackgroundAndroid?: ?Object,
nativeForegroundAndroid?: ?Object,
/* Deprecated transform prop. Use the transform style prop instead */
rotation?: empty,
/* Deprecated transform prop. Use the transform style prop instead */
scaleX?: empty,
/* Deprecated transform prop. Use the transform style prop instead */
scaleY?: empty,
/* Deprecated transform prop. Use the transform style prop instead */
translateX?: empty,
/* Deprecated transform prop. Use the transform style prop instead */
translateY?: empty,
|}>;
export type ViewProps = $ReadOnly<{|
@ -84,13 +73,7 @@ export type ViewProps = $ReadOnly<{|
...TVViewProps,
accessible?: ?boolean,
accessibilityLabel?: ?(
| null
| React$PropType$Primitive<any>
| Stringish
| $ReadOnlyArray<any>
| any
),
accessibilityLabel?: ?Stringish,
accessibilityHint?: ?Stringish,
accessibilityActions?: ?$ReadOnlyArray<string>,
accessibilityComponentType?: ?AccessibilityComponentType,