import { DependencyList } from "../utils/depsAreSame";
import type { BasicTarget } from "../utils/domTarget";
export declare type Data = {
    list: any[];
    [key: string]: any;
};
export declare type Service<TData extends Data> = (currentData?: TData) => Promise<TData>;
export interface InfiniteScrollResult<TData extends Data> {
    data: TData;
    loading: boolean;
    loadingMore: boolean;
    noMore: boolean;
    loadMore: () => void;
    loadMoreAsync: () => Promise<TData>;
    reload: () => void;
    reloadAsync: () => Promise<TData>;
    cancel: () => void;
    mutate: (data?: TData) => void;
}
export interface InfiniteScrollOptions<TData extends Data> {
    target?: BasicTarget<Element | Document>;
    isNoMore?: (data?: TData) => boolean;
    threshold?: number;
    manual?: boolean;
    reloadDeps?: DependencyList;
    onBefore?: () => void;
    onSuccess?: (data: TData) => void;
    onError?: (e: Error) => void;
    onFinally?: (data?: TData, e?: Error) => void;
}
