import type { DependencyList, RNNativeScrollEvent, ReanimatedScrollEvent } from './commonTypes'; import type { EventHandlerInternal, EventHandlerProcessed } from './useEvent'; export type ScrollHandler = Record> = (event: ReanimatedScrollEvent, context: Context) => void; export interface ScrollHandlers> { onScroll?: ScrollHandler; onBeginDrag?: ScrollHandler; onEndDrag?: ScrollHandler; onMomentumBegin?: ScrollHandler; onMomentumEnd?: ScrollHandler; } export type ScrollHandlerProcessed = Record> = EventHandlerProcessed; export type ScrollHandlerInternal = EventHandlerInternal; /** * Lets you run callbacks on ScrollView events. Supports `onScroll`, * `onBeginDrag`, `onEndDrag`, `onMomentumBegin`, and `onMomentumEnd` events. * * These callbacks are automatically workletized and ran on the UI thread. * * @param handlers - An object containing event handlers. * @param dependencies - An optional array of dependencies. Only relevant when * using Reanimated without the Babel plugin on the Web. * @returns An object you need to pass to `onScroll` prop on the * `Animated.ScrollView` component. * @see https://docs.swmansion.com/react-native-reanimated/docs/scroll/useAnimatedScrollHandler */ export declare function useAnimatedScrollHandler>(handlers: ScrollHandler | ScrollHandlers, dependencies?: DependencyList): ScrollHandlerProcessed; //# sourceMappingURL=useAnimatedScrollHandler.d.ts.map