import type { GQlessClient, GQlessError, Selection } from 'gqless'; import type { SchedulerPromiseValue } from 'gqless/dist/Scheduler'; import { BuildSelections } from '../common'; export interface UseMetaStateOptions { onStartFetching?: () => void; onDoneFetching?: () => void; onError?: (data: { newError: GQlessError; selections: Selection[]; isLastTry: boolean; }) => void; onRetry?: (data: { retryPromise: Promise; selections: Set; }) => void; filterSelections?: BuildSelections; } export interface MetaState { isFetching: boolean; errors?: GQlessError[]; } export interface UseMetaState { (opts?: UseMetaStateOptions): MetaState; } export declare function createUseMetaState(client: GQlessClient): UseMetaState;