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