import { QueryObserverOptions, QueryObserverResult, RefetchOptions, ResultOptions } from './types'; import { Query, Action, FetchOptions } from './query'; import { QueryClient } from './queryClient'; import { Subscribable } from './subscribable'; declare type QueryObserverListener = (result: QueryObserverResult) => void; export interface ObserverFetchOptions extends FetchOptions { throwOnError?: boolean; } export declare class QueryObserver extends Subscribable> { options: QueryObserverOptions; private client; private currentQuery; private currentResult; private currentResultState?; private previousQueryResult?; private initialDataUpdateCount; private initialErrorUpdateCount; private staleTimeoutId?; private refetchIntervalId?; constructor(client: QueryClient, options: QueryObserverOptions); protected bindMethods(): void; protected onSubscribe(): void; protected onUnsubscribe(): void; willLoadOnMount(): boolean; willRefetchOnMount(): boolean; willFetchOnMount(): boolean; willFetchOnReconnect(): boolean; willFetchOnWindowFocus(): boolean; private willFetchOptionally; private isStale; destroy(): void; setOptions(options?: QueryObserverOptions): void; getCurrentResult(): QueryObserverResult; getNextResult(options?: ResultOptions): Promise>; getCurrentQuery(): Query; remove(): void; refetch(options?: RefetchOptions): Promise>; protected fetch(fetchOptions?: ObserverFetchOptions): Promise>; private optionalFetch; private executeFetch; private updateStaleTimeout; private updateRefetchInterval; private updateTimers; private clearTimers; private clearStaleTimeout; private clearRefetchInterval; protected getNewResult(willFetch?: boolean): QueryObserverResult; private shouldNotifyListeners; private updateResult; private updateQuery; onQueryUpdate(action: Action): void; private notify; } export {};