export declare type fetcherFn = (...args: any) => Data | Promise; export interface ConfigInterface = fetcherFn> { errorRetryInterval?: number; loadingTimeout?: number; focusThrottleInterval?: number; dedupingInterval?: number; refreshInterval?: number; refreshWhenHidden?: boolean; refreshWhenOffline?: boolean; revalidateOnFocus?: boolean; revalidateOnReconnect?: boolean; shouldRetryOnError?: boolean; fetcher?: Fn; suspense?: boolean; initialData?: Data; onLoadingSlow?: (key: string, config: ConfigInterface) => void; onSuccess?: (data: Data, key: string, config: ConfigInterface) => void; onError?: (err: Error, key: string, config: ConfigInterface) => void; onErrorRetry?: (err: Error, key: string, config: ConfigInterface, revalidate: revalidateType, revalidateOpts: RevalidateOptionInterface) => void; } export interface RevalidateOptionInterface { retryCount?: number; dedupe?: boolean; } declare type keyFunction = () => string | any[] | null; export declare type keyInterface = keyFunction | string | any[] | null; export declare type updaterInterface = (shouldRevalidate?: boolean, data?: Data, error?: Error, shouldDedupe?: boolean) => boolean | Promise; export declare type triggerInterface = (key: keyInterface, shouldRevalidate?: boolean) => void; export declare type mutateInterface = (key: keyInterface, data: Data | Promise, shouldRevalidate?: boolean) => void; export declare type broadcastStateInterface = (key: string, data: Data, error?: Error) => void; export declare type responseInterface = { data?: Data; error?: Error; revalidate: () => Promise; isValidating: boolean; }; export declare type revalidateType = (revalidateOpts: RevalidateOptionInterface) => Promise; export declare type pagesWithSWRType = (swr: responseInterface) => responseInterface; export declare type pagesPropsInterface = { offset: Offset; withSWR: pagesWithSWRType; }; export declare type pageComponentType = (props: pagesPropsInterface) => any; export declare type pageOffsetMapperType = (SWR: responseInterface, index: number) => Offset; export declare type pagesResponseInterface = { pages: any; pageCount: number; pageSWRs: responseInterface[]; isLoadingMore: boolean; isReachingEnd: boolean; isEmpty: boolean; loadMore: () => void; }; export declare type actionType = { data?: Data; error?: Error; isValidating?: boolean; }; export {};