From 8a53ccc563fc594678dda06a215b7cf7a6ac5231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Fri, 16 Oct 2026 13:39:14 +0200 Subject: [PATCH] Keep the pointerEvents ts-expect-error in emitted spec declarations --- .../src/specs/RNGestureHandlerButtonNativeComponent.ts | 2 +- .../src/specs/RNGestureHandlerDetectorNativeComponent.ts | 2 +- .../src/specs/RNGestureHandlerRootViewNativeComponent.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts index 11318dd7f6..55fb02100f 100644 --- a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts +++ b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts @@ -11,7 +11,7 @@ export type ButtonEvent = Readonly<{ pointerType: CodegenTypes.Int32; }>; -// @ts-ignore - Redefining pointerEvents with WithDefault for codegen, conflicts with ViewProps type but codegen needs it +/** @ts-ignore - Redefining pointerEvents with WithDefault for codegen, conflicts with ViewProps type but codegen needs it */ interface NativeProps extends ViewProps { // The events are namespaced with `Button` because the base view config on iOS // already registers `topPress` as a bubbling event — a direct event with the diff --git a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerDetectorNativeComponent.ts b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerDetectorNativeComponent.ts index 560841d4e5..ba0a7b01ae 100644 --- a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerDetectorNativeComponent.ts +++ b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerDetectorNativeComponent.ts @@ -41,7 +41,7 @@ export interface VirtualChildrenProps { viewTag: CodegenTypes.Int32; } -// @ts-expect-error WithDefault adds `| null` to the type, which doesn't align with ViewProps.pointerEvents +/** @ts-expect-error WithDefault adds `| null` to the type, which doesn't align with ViewProps.pointerEvents */ // Using Exclude to remove null from the type makes the error go away, but breaks codegen. export interface NativeProps extends ViewProps { onGestureHandlerEvent?: diff --git a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerRootViewNativeComponent.ts b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerRootViewNativeComponent.ts index 5cae1374a2..e69b49e371 100644 --- a/packages/react-native-gesture-handler/src/specs/RNGestureHandlerRootViewNativeComponent.ts +++ b/packages/react-native-gesture-handler/src/specs/RNGestureHandlerRootViewNativeComponent.ts @@ -6,7 +6,7 @@ export interface RootViewNativeProps extends ViewProps { unstable_forceActive?: boolean; } -// @ts-expect-error WithDefault adds null for codegen, unlike ViewProps.pointerEvents. +/** @ts-expect-error WithDefault adds null for codegen, unlike ViewProps.pointerEvents. */ interface NativeProps extends ViewProps { pointerEvents?: CodegenTypes.WithDefault< 'box-none' | 'none' | 'box-only' | 'auto',