import { keyType, fetcherFn, ConfigInterface, responseInterface } from './types'; declare type KeyLoader = (index: number, previousPageData: Data | null) => keyType; export declare type SWRInfiniteConfigInterface = ConfigInterface> & { initialSize?: number; revalidateAll?: boolean; persistSize?: boolean; }; export declare type SWRInfiniteResponseInterface = responseInterface & { size: number; setSize: (size: number | ((size: number) => number)) => Promise; }; declare function useSWRInfinite(getKey: KeyLoader): SWRInfiniteResponseInterface; declare function useSWRInfinite(getKey: KeyLoader, config?: SWRInfiniteConfigInterface): SWRInfiniteResponseInterface; declare function useSWRInfinite(getKey: KeyLoader, fn?: fetcherFn, config?: SWRInfiniteConfigInterface): SWRInfiniteResponseInterface; export { useSWRInfinite };