import { QueryBehavior } from './queryInfo'; import { InfiniteData } from './types'; export type GetPreviousPageParamFunction = (firstPage: TFetcherData, allPages: TFetcherData[], firstPageParam: number, allPageParams: number[]) => number | undefined | null; export type GetNextPageParamFunction = (lastPage: TFetcherData, allPages: TFetcherData[], lastPageParam: number, allPageParams: number[]) => number | undefined | null; export interface InfiniteQueryPageParamsOptions { /** * This function can be set to automatically get the previous cursor for infinite queries. * The result will also be used to determine the value of `hasPreviousPage`. */ getPreviousPageParam?: GetPreviousPageParamFunction; /** * This function can be set to automatically get the next cursor for infinite queries. * The result will also be used to determine the value of `hasNextPage`. */ getNextPageParam: GetNextPageParamFunction; initialPageParam: number; } export declare const createInfiniteQueryBehavior: (pages?: number) => QueryBehavior>; /** * Checks if there is a next page. */ export declare const hasNextPage: (options: InfiniteQueryPageParamsOptions, data?: InfiniteData) => boolean; /** * Checks if there is a previous page. */ export declare const hasPreviousPage: (options: InfiniteQueryPageParamsOptions, data?: InfiniteData) => boolean;