react-native-gesture-handler
Version:
Declarative API exposing native platform touch and gesture system to React Native
48 lines (39 loc) • 1.44 kB
text/typescript
import type {
BaseGestureConfig,
ExcludeInternalConfigProps,
GestureEndEvent,
GestureEvent,
SingleGesture,
} from '../../../types';
export type RotationGestureNativeProperties = Record<string, never>;
// We want to keep `{}` because it does not break ts-server suggestions
// eslint-disable-next-line @typescript-eslint/ban-types
export type RotationHandlerData = {};
export type RotationExtendedHandlerData = {
rotation: number;
velocity: number;
anchorX: number;
anchorY: number;
rotationChange: number;
};
export type RotationGestureProperties = RotationGestureNativeProperties;
export type RotationGestureInternalConfig = BaseGestureConfig<
RotationGestureProperties,
RotationHandlerData,
RotationExtendedHandlerData
>;
export type RotationGestureConfig =
ExcludeInternalConfigProps<RotationGestureInternalConfig>;
export type RotationGestureBeginEvent = GestureEvent<RotationHandlerData>;
export type RotationGestureActiveEvent =
GestureEvent<RotationExtendedHandlerData>;
export type RotationGestureDeactivateEvent =
GestureEndEvent<RotationExtendedHandlerData>;
export type RotationGestureFinalizeEvent = GestureEndEvent<RotationHandlerData>;
/** @deprecated Use `RotationGestureBeginEvent` instead. */
export type RotationGestureEvent = RotationGestureBeginEvent;
export type RotationGesture = SingleGesture<
RotationGestureProperties,
RotationHandlerData,
RotationExtendedHandlerData
>;