diff --git a/packages/react-native/Libraries/Types/CoreEventTypes.d.ts b/packages/react-native/Libraries/Types/CoreEventTypes.d.ts index 1325e1d635d..3bcef4f26b9 100644 --- a/packages/react-native/Libraries/Types/CoreEventTypes.d.ts +++ b/packages/react-native/Libraries/Types/CoreEventTypes.d.ts @@ -265,4 +265,12 @@ export interface PointerEvents { onPointerDownCapture?: ((event: PointerEvent) => void) | undefined; onPointerUp?: ((event: PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: PointerEvent) => void) | undefined; + onPointerOver?: ((event: PointerEvent) => void) | undefined; + onPointerOverCapture?: ((event: PointerEvent) => void) | undefined; + onPointerOut?: ((event: PointerEvent) => void) | undefined; + onPointerOutCapture?: ((event: PointerEvent) => void) | undefined; + onGotPointerCapture?: ((event: PointerEvent) => void) | undefined; + onGotPointerCaptureCapture?: ((event: PointerEvent) => void) | undefined; + onLostPointerCapture?: ((event: PointerEvent) => void) | undefined; + onLostPointerCaptureCapture?: ((event: PointerEvent) => void) | undefined; } diff --git a/packages/react-native/types/__typetests__/index.tsx b/packages/react-native/types/__typetests__/index.tsx index 7f372d745c1..422d57fc0c9 100644 --- a/packages/react-native/types/__typetests__/index.tsx +++ b/packages/react-native/types/__typetests__/index.tsx @@ -338,6 +338,18 @@ const lists = StyleSheet.create({ const container = StyleSheet.compose(page.container, lists.listContainer); ; + +// Pointer events (W3C): all variants should be accepted on View. + e.nativeEvent.pointerId} + onPointerOverCapture={e => e.nativeEvent.pointerId} + onPointerOut={e => e.nativeEvent.pointerId} + onPointerOutCapture={e => e.nativeEvent.pointerId} + onGotPointerCapture={e => e.nativeEvent.pointerId} + onGotPointerCaptureCapture={e => e.nativeEvent.pointerId} + onLostPointerCapture={e => e.nativeEvent.pointerId} + onLostPointerCaptureCapture={e => e.nativeEvent.pointerId} +/>; const text = StyleSheet.compose(page.text, lists.listItem) as TextStyle; ;