UNPKG

1.02 kBTypeScriptView Raw
1import { BaseGesture, BaseGestureConfig } from './gesture';
2import { FlingGestureConfig } from '../FlingGestureHandler';
3import type { FlingGestureHandlerEventPayload } from '../GestureHandlerEventPayload';
4export declare class FlingGesture extends BaseGesture<FlingGestureHandlerEventPayload> {
5 config: BaseGestureConfig & FlingGestureConfig;
6 constructor();
7 /**
8 * Determine exact number of points required to handle the fling gesture.
9 * @param pointers
10 */
11 numberOfPointers(pointers: number): this;
12 /**
13 * Expressed allowed direction of movement.
14 * Expected values are exported as constants in the Directions object.
15 * Arguments can be combined using `|` operator. Default value is set to `MouseButton.LEFT`.
16 * @param direction
17 * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture/#directionvalue-directions
18 */
19 direction(direction: number): this;
20}
21export type FlingGestureType = InstanceType<typeof FlingGesture>;