UNPKG

362 BTypeScriptView Raw
1import type { BasicTarget } from '../utils/domTarget';
2type Position = {
3 left: number;
4 top: number;
5};
6export type Target = BasicTarget<Element | Document>;
7export type ScrollListenController = (val: Position) => boolean;
8declare function useScroll(target?: Target, shouldUpdate?: ScrollListenController): Position | undefined;
9export default useScroll;