import type { DefaultedQueryObserverOptions, RefetchPageFilters } from './types'; import type { QueryKey, QueryObserverOptions, QueryObserverResult, RefetchOptions } from './types'; import type { Query, Action, FetchOptions } from './query'; import type { QueryClient } from './queryClient'; import { Subscribable } from './subscribable'; declare type QueryObserverListener = (result: QueryObserverResult) => void; export interface NotifyOptions { cache?: boolean; listeners?: boolean; onError?: boolean; onSuccess?: boolean; } export interface ObserverFetchOptions extends FetchOptions { throwOnError?: boolean; } export declare class QueryObserver extends Subscribable> { options: QueryObserverOptions; private client; private currentQuery; private currentQueryInitialState; private currentResult; private currentResultState?; private currentResultOptions?; private previousQueryResult?; private selectError; private selectFn?; private selectResult?; private staleTimeoutId?; private refetchIntervalId?; private currentRefetchInterval?; private trackedProps; constructor(client: QueryClient, options: QueryObserverOptions); protected bindMethods(): void; protected onSubscribe(): void; protected onUnsubscribe(): void; shouldFetchOnReconnect(): boolean; shouldFetchOnWindowFocus(): boolean; destroy(): void; setOptions(options?: QueryObserverOptions, notifyOptions?: NotifyOptions): void; getOptimisticResult(options: DefaultedQueryObserverOptions): QueryObserverResult; getCurrentResult(): QueryObserverResult; trackResult(result: QueryObserverResult): QueryObserverResult; getCurrentQuery(): Query; remove(): void; refetch({ refetchPage, ...options }?: RefetchOptions & RefetchPageFilters): Promise>; fetchOptimistic(options: QueryObserverOptions): Promise>; protected fetch(fetchOptions: ObserverFetchOptions): Promise>; private executeFetch; private updateStaleTimeout; private computeRefetchInterval; private updateRefetchInterval; private updateTimers; private clearStaleTimeout; private clearRefetchInterval; protected createResult(query: Query, options: QueryObserverOptions): QueryObserverResult; updateResult(notifyOptions?: NotifyOptions): void; private updateQuery; onQueryUpdate(action: Action): void; private notify; } export {}; //# sourceMappingURL=queryObserver.d.ts.map