Skip to content

Commit 3cb1164

Browse files
committed
add missing types
1 parent 738a33c commit 3cb1164

File tree

10 files changed

+83
-9
lines changed

10 files changed

+83
-9
lines changed
Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
export type { TapGestureConfig } from './useTap';
2-
export { useTap } from './useTap';
2+
export { useTap, TapGesture, TapGestureEvent } from './useTap';
33

44
export type { FlingGestureConfig } from './useFling';
5-
export { useFling } from './useFling';
5+
export { useFling, FlingGesture, FlingGestureEvent } from './useFling';
66

77
export type { LongPressGestureConfig } from './useLongPress';
8-
export { useLongPress } from './useLongPress';
8+
export {
9+
useLongPress,
10+
LongPressGesture,
11+
LongPressGestureEvent,
12+
} from './useLongPress';
913

1014
export type { PinchGestureConfig } from './usePinch';
11-
export { usePinch } from './usePinch';
15+
export { usePinch, PinchGesture, PinchGestureEvent } from './usePinch';
1216

1317
export type { RotationGestureConfig } from './useRotation';
14-
export { useRotation } from './useRotation';
18+
export {
19+
useRotation,
20+
RotationGesture,
21+
RotationGestureEvent,
22+
} from './useRotation';
1523

1624
export type { HoverGestureConfig } from './useHover';
17-
export { useHover } from './useHover';
25+
export { useHover, HoverGesture, HoverGestureEvent } from './useHover';
1826

1927
export type { ManualGestureConfig } from './useManual';
20-
export { useManual } from './useManual';
28+
export { useManual, ManualGesture, ManualGestureEvent } from './useManual';
2129

2230
export type { NativeViewGestureConfig } from './useNative';
23-
export { useNative } from './useNative';
31+
export { useNative, NativeGesture, NativeGestureEvent } from './useNative';
2432

2533
export type { PanGestureConfig } from './usePan';
26-
export { usePan } from './usePan';
34+
export { usePan, PanGesture, PanGestureEvent } from './usePan';

packages/react-native-gesture-handler/src/v3/hooks/gestures/useFling.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -51,3 +53,9 @@ export function useFling(config: FlingGestureConfig) {
5153

5254
return useGesture(SingleGestureName.Fling, flingConfig);
5355
}
56+
57+
export type FlingGestureEvent = GestureEvents<FlingHandlerData>;
58+
export type FlingGesture = SingleGesture<
59+
FlingHandlerData,
60+
FlingGestureProperties
61+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useHover.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { HoverEffect } from '../../../handlers/gestures/hoverGesture';
33
import {
44
BaseGestureConfig,
55
ExcludeInternalConfigProps,
6+
GestureEvents,
7+
SingleGesture,
68
SingleGestureName,
79
} from '../../types';
810
import { useGesture } from '../useGesture';
@@ -44,3 +46,9 @@ export function useHover(config: HoverGestureConfig) {
4446

4547
return useGesture(SingleGestureName.Hover, hoverConfig);
4648
}
49+
50+
export type HoverGestureEvent = GestureEvents<HoverHandlerData>;
51+
export type HoverGesture = SingleGesture<
52+
HoverHandlerData,
53+
HoverGestureProperties
54+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useLongPress.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -78,3 +80,9 @@ export function useLongPress(config: LongPressGestureConfig) {
7880
longPressConfig
7981
);
8082
}
83+
84+
export type LongPressGestureEvent = GestureEvents<LongPressHandlerData>;
85+
export type LongPressGesture = SingleGesture<
86+
LongPressHandlerData,
87+
LongPressGestureProperties
88+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useManual.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -24,3 +26,9 @@ export function useManual(config: ManualGestureConfig) {
2426

2527
return useGesture(SingleGestureName.Manual, manualConfig);
2628
}
29+
30+
export type ManualGestureEvent = GestureEvents<ManualHandlerData>;
31+
export type ManualGesture = SingleGesture<
32+
ManualHandlerData,
33+
ManualGestureProperties
34+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useNative.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -42,3 +44,9 @@ export function useNative(config: NativeViewGestureConfig) {
4244

4345
return useGesture(SingleGestureName.Native, nativeConfig);
4446
}
47+
48+
export type NativeGestureEvent = GestureEvents<NativeViewHandlerData>;
49+
export type NativeGesture = SingleGesture<
50+
NativeViewHandlerData,
51+
NativeViewGestureProperties
52+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/usePan.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { StylusData } from '../../../handlers/gestureHandlerCommon';
22
import {
33
BaseGestureConfig,
44
ExcludeInternalConfigProps,
5+
GestureEvents,
6+
SingleGesture,
57
SingleGestureName,
68
} from '../../types';
79
import { useGesture } from '../useGesture';
@@ -257,3 +259,6 @@ export function usePan(config: PanGestureConfig) {
257259
panConfig
258260
);
259261
}
262+
263+
export type PanGestureEvent = GestureEvents<PanHandlerData>;
264+
export type PanGesture = SingleGesture<PanHandlerData, PanGestureProperties>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/usePinch.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -30,3 +32,9 @@ export function usePinch(config: PinchGestureConfig) {
3032

3133
return useGesture(SingleGestureName.Pinch, pinchConfig);
3234
}
35+
36+
export type PinchGestureEvent = GestureEvents<PinchHandlerData>;
37+
export type PinchGesture = SingleGesture<
38+
PinchHandlerData,
39+
PinchGestureProperties
40+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useRotation.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -31,3 +33,9 @@ export function useRotation(config: RotationGestureConfig) {
3133

3234
return useGesture(SingleGestureName.Rotation, rotationConfig);
3335
}
36+
37+
export type RotationGestureEvent = GestureEvents<RotationHandlerData>;
38+
export type RotationGesture = SingleGesture<
39+
RotationHandlerData,
40+
RotationGestureProperties
41+
>;

packages/react-native-gesture-handler/src/v3/hooks/gestures/useTap.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
BaseGestureConfig,
33
ExcludeInternalConfigProps,
4+
GestureEvents,
5+
SingleGesture,
46
SingleGestureName,
57
} from '../../types';
68
import { useGesture } from '../useGesture';
@@ -107,3 +109,6 @@ export function useTap(config: TapGestureConfig) {
107109
tapConfig
108110
);
109111
}
112+
113+
export type TapGestureEvent = GestureEvents<TapHandlerData>;
114+
export type TapGesture = SingleGesture<TapHandlerData, TapGestureProperties>;

0 commit comments

Comments
 (0)