UNPKG

571 BTypeScriptView Raw
1import type { Data, InfiniteScrollOptions, Service } from './types';
2declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteScrollOptions<TData>) => {
3 data: TData | undefined;
4 loading: boolean;
5 loadingMore: boolean;
6 noMore: boolean;
7 loadMore: () => void;
8 loadMoreAsync: () => Promise<TData>;
9 reload: () => void;
10 reloadAsync: () => Promise<TData>;
11 mutate: import("react").Dispatch<import("react").SetStateAction<TData | undefined>>;
12 cancel: () => void;
13};
14export default useInfiniteScroll;