import type { SWRConfig as CoreSWRConfig, Key, Fetcher, MutatorOptions, BareFetcher } from '../../core' import type { Writable, Readable } from 'svelte/store' export interface SWRConfig extends CoreSWRConfig { // Svelte-specific config store?: boolean suspense?: boolean fallbackData?: Data revalidateOnMount?: boolean revalidateOnFocus?: boolean revalidateOnReconnect?: boolean refreshWhenHidden?: boolean refreshWhenOffline?: boolean compare?: (a: Data | undefined, b: Data | undefined) => boolean } export interface SWRStores { data: Readable error: Readable isLoading: Readable isValidating: Readable loading: Readable validating: Readable mutate: (data?: Data | ((current: Data | undefined) => Data | Promise), options?: Partial>) => Promise } export interface SWRStore extends Writable<{ data?: Data error?: Error isLoading: boolean isValidating: boolean loading: boolean validating: boolean }> { mutate: (data?: Data | ((current: Data | undefined) => Data | Promise), options?: Partial>) => Promise } // Re-export core types export type { Key, Fetcher, MutatorOptions, BareFetcher, SWRFetcher } from '../../core'