infinite-scroll-svelte
Version:
Wrapper that fires events when the user has scrolled it to the beginning or end
23 lines (22 loc) • 730 B
TypeScript
import { type Snippet } from 'svelte';
import type { HTMLAttributes } from 'svelte/elements';
declare const InfiniteScroll: import("svelte").Component<{
children: Snippet;
throttleInMs?: number;
promiseRejectTimeoutInSecs?: number;
/**
* The scroll event will be blocked
* until one of the methods is executed.
*/
onPrev?: () => Promise<any>;
onNext?: () => Promise<any>;
onError?: (error: Error) => any;
onLock?: () => any;
onUnlock?: () => any;
scrollX?: boolean;
scrollY?: boolean;
thresholdPrevInPx?: number;
thresholdNextInPx?: number;
} & HTMLAttributes<any>, {}, "">;
type InfiniteScroll = ReturnType<typeof InfiniteScroll>;
export default InfiniteScroll;