Skip to content

Commit 19a8a57

Browse files
yungstersfacebook-github-bot
authored andcommitted
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
1 parent 6a1f48e commit 19a8a57

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

Libraries/Components/View/ViewPropTypes.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ type GestureResponderEventProps = $ReadOnly<{|
6060
type AndroidViewProps = $ReadOnly<{|
6161
nativeBackgroundAndroid?: ?Object,
6262
nativeForegroundAndroid?: ?Object,
63-
64-
/* Deprecated transform prop. Use the transform style prop instead */
65-
rotation?: empty,
66-
/* Deprecated transform prop. Use the transform style prop instead */
67-
scaleX?: empty,
68-
/* Deprecated transform prop. Use the transform style prop instead */
69-
scaleY?: empty,
70-
/* Deprecated transform prop. Use the transform style prop instead */
71-
translateX?: empty,
72-
/* Deprecated transform prop. Use the transform style prop instead */
73-
translateY?: empty,
7463
|}>;
7564

7665
export type ViewProps = $ReadOnly<{|
@@ -84,13 +73,7 @@ export type ViewProps = $ReadOnly<{|
8473
...TVViewProps,
8574

8675
accessible?: ?boolean,
87-
accessibilityLabel?: ?(
88-
| null
89-
| React$PropType$Primitive<any>
90-
| Stringish
91-
| $ReadOnlyArray<any>
92-
| any
93-
),
76+
accessibilityLabel?: ?Stringish,
9477
accessibilityHint?: ?Stringish,
9578
accessibilityActions?: ?$ReadOnlyArray<string>,
9679
accessibilityComponentType?: ?AccessibilityComponentType,

0 commit comments

Comments
 (0)