import { Ref, WatchSource } from 'vue'; import SWRVCache from './cache'; import LocalStorageCache from './cache/adapters/localStorage'; export declare type fetcherFn = (...args: any) => Data | Promise; export interface IConfig = fetcherFn> { refreshInterval?: number; cache?: LocalStorageCache | SWRVCache; dedupingInterval?: number; ttl?: number; serverTTL?: number; revalidateOnFocus?: boolean; revalidateDebounce?: number; shouldRetryOnError?: boolean | ((err: Error) => boolean); errorRetryInterval?: number; errorRetryCount?: number; fetcher?: Fn; isOnline?: () => boolean; isDocumentVisible?: () => boolean; } export interface revalidateOptions { shouldRetryOnError?: boolean | ((err: Error) => boolean); errorRetryCount?: number; forceRevalidate?: boolean; } export interface IResponse { data: Ref; error: Ref; isValidating: Ref; isLoading: Ref; mutate: (data?: fetcherFn, opts?: revalidateOptions) => Promise; } export declare type keyType = string | any[] | null | undefined; export declare type IKey = keyType | WatchSource;