@@ -35,7 +35,43 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
35
35
export type ViewLayout = Layout ;
36
36
export type ViewLayoutEvent = LayoutEvent ;
37
37
38
+ type DirectEventProps = $ReadOnly < { |
39
+ onAccessibilityAction ? : Function ,
40
+ onAccessibilityTap ? : Function ,
41
+ onLayout ?: ?( event : LayoutEvent ) => void ,
42
+ onMagicTap ?: Function ,
43
+ | } > ;
44
+
45
+ type TouchEventProps = $ReadOnly < { |
46
+ onTouchCancel ?: ?Function ,
47
+ onTouchCancelCapture ?: ?Function ,
48
+ onTouchEnd ?: ?Function ,
49
+ onTouchEndCapture ?: ?Function ,
50
+ onTouchMove ?: ?Function ,
51
+ onTouchMoveCapture ?: ?Function ,
52
+ onTouchStart ?: ?Function ,
53
+ onTouchStartCapture ?: ?Function ,
54
+ | } > ;
55
+
56
+ type GestureResponderEventProps = $ReadOnly < { |
57
+ onMoveShouldSetResponder ?: ?Function ,
58
+ onMoveShouldSetResponderCapture ?: ?Function ,
59
+ onResponderGrant ?: ?Function ,
60
+ onResponderMove ?: ?Function ,
61
+ onResponderReject ?: ?Function ,
62
+ onResponderRelease ?: ?Function ,
63
+ onResponderStart ?: ?Function ,
64
+ onResponderTerminate ?: ?Function ,
65
+ onResponderTerminationRequest ?: ?Function ,
66
+ onStartShouldSetResponder ?: ?Function ,
67
+ onStartShouldSetResponderCapture ?: ?Function ,
68
+ | } > ;
69
+
38
70
export type ViewProps = $ReadOnly < { |
71
+ ...DirectEventProps ,
72
+ ...GestureResponderEventProps ,
73
+ ...TouchEventProps ,
74
+
39
75
// There's no easy way to create a different type if (Platform.isTVOS):
40
76
// so we must include TVViewProps
41
77
...TVViewProps ,
@@ -55,22 +91,8 @@ export type ViewProps = $ReadOnly<{|
55
91
accessibilityViewIsModal ?: boolean ,
56
92
accessibilityElementsHidden ?: boolean ,
57
93
children ?: ?React . Node ,
58
- onAccessibilityAction ?: Function ,
59
- onAccessibilityTap ?: Function ,
60
- onMagicTap ?: Function ,
61
94
testID ?: ?string ,
62
95
nativeID ?: string ,
63
- onLayout ?: ?( event : LayoutEvent ) => void ,
64
- onResponderGrant ?: ?Function ,
65
- onResponderMove ?: ?Function ,
66
- onResponderReject ?: ?Function ,
67
- onResponderRelease ?: ?Function ,
68
- onResponderTerminate ?: ?Function ,
69
- onResponderTerminationRequest ?: ?Function ,
70
- onStartShouldSetResponder ?: ?Function ,
71
- onStartShouldSetResponderCapture ?: ?Function ,
72
- onMoveShouldSetResponder ?: ?Function ,
73
- onMoveShouldSetResponderCapture ?: ?Function ,
74
96
hitSlop ?: ?EdgeInsetsProp ,
75
97
pointerEvents ?: null | 'box-none' | 'none' | 'box-only' | 'auto' ,
76
98
style ?: stylePropType ,
0 commit comments