File tree Expand file tree Collapse file tree 3 files changed +29
-23
lines changed
packages/react-native/Libraries Expand file tree Collapse file tree 3 files changed +29
-23
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export type Props = ViewProps;
24
24
* @see https://reactnative.dev/docs/view
25
25
*/
26
26
const View : component (
27
- ref : React . RefSetter < React . ElementRef < typeof ViewNativeComponent > > ,
27
+ ref ? : React . RefSetter < React . ElementRef < typeof ViewNativeComponent >> ,
28
28
...props : ViewProps
29
29
) = React . forwardRef (
30
30
(
Original file line number Diff line number Diff line change @@ -356,17 +356,7 @@ export type ViewPropsIOS = $ReadOnly<{
356
356
shouldRasterizeIOS ?: ?boolean ,
357
357
} > ;
358
358
359
- export type ViewProps = $ReadOnly < {
360
- ...DirectEventProps ,
361
- ...GestureResponderHandlers ,
362
- ...MouseEventProps ,
363
- ...PointerEventProps ,
364
- ...FocusEventProps ,
365
- ...TouchEventProps ,
366
- ...ViewPropsAndroid ,
367
- ...ViewPropsIOS ,
368
- ...AccessibilityProps ,
369
-
359
+ type ViewBaseProps = $ReadOnly < {
370
360
children ?: Node ,
371
361
style ?: ?ViewStyleProp ,
372
362
@@ -454,3 +444,16 @@ export type ViewProps = $ReadOnly<{
454
444
*/
455
445
removeClippedSubviews ?: ?boolean ,
456
446
} > ;
447
+
448
+ export type ViewProps = $ReadOnly < {
449
+ ...DirectEventProps ,
450
+ ...GestureResponderHandlers ,
451
+ ...MouseEventProps ,
452
+ ...PointerEventProps ,
453
+ ...FocusEventProps ,
454
+ ...TouchEventProps ,
455
+ ...ViewPropsAndroid ,
456
+ ...ViewPropsIOS ,
457
+ ...AccessibilityProps ,
458
+ ...ViewBaseProps ,
459
+ } > ;
Original file line number Diff line number Diff line change @@ -3633,7 +3633,7 @@ declare export default typeof ReactNativeViewAttributes;
3633
3633
exports[`public API should not change unintentionally Libraries/Components/View/View.js 1`] = `
3634
3634
"export type Props = ViewProps;
3635
3635
declare const View: component(
3636
- ref: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
3636
+ ref? : React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
3637
3637
...props: ViewProps
3638
3638
);
3639
3639
declare export default typeof View;
@@ -3927,16 +3927,7 @@ export type ViewPropsAndroid = $ReadOnly<{
3927
3927
export type ViewPropsIOS = $ReadOnly<{
3928
3928
shouldRasterizeIOS?: ?boolean,
3929
3929
}>;
3930
- export type ViewProps = $ReadOnly<{
3931
- ...DirectEventProps,
3932
- ...GestureResponderHandlers,
3933
- ...MouseEventProps,
3934
- ...PointerEventProps,
3935
- ...FocusEventProps,
3936
- ...TouchEventProps,
3937
- ...ViewPropsAndroid,
3938
- ...ViewPropsIOS,
3939
- ...AccessibilityProps,
3930
+ type ViewBaseProps = $ReadOnly<{
3940
3931
children?: Node,
3941
3932
style?: ?ViewStyleProp,
3942
3933
collapsable?: ?boolean,
@@ -3949,6 +3940,18 @@ export type ViewProps = $ReadOnly<{
3949
3940
pointerEvents?: ?(\\"auto\\" | \\"box-none\\" | \\"box-only\\" | \\"none\\"),
3950
3941
removeClippedSubviews?: ?boolean,
3951
3942
}>;
3943
+ export type ViewProps = $ReadOnly<{
3944
+ ...DirectEventProps,
3945
+ ...GestureResponderHandlers,
3946
+ ...MouseEventProps,
3947
+ ...PointerEventProps,
3948
+ ...FocusEventProps,
3949
+ ...TouchEventProps,
3950
+ ...ViewPropsAndroid,
3951
+ ...ViewPropsIOS,
3952
+ ...AccessibilityProps,
3953
+ ...ViewBaseProps,
3954
+ }>;
3952
3955
"
3953
3956
`;
3954
3957
You can’t perform that action at this time.
0 commit comments