import { MutableRefObject } from 'react';
import { ErrorMonitor, QueryResultStatus } from '@wix/bex-core';
export interface PromiseState<T> {
    status: QueryResultStatus<T, unknown>;
    fetchOnce: () => Promise<QueryResultStatus<T, unknown>>;
    promiseFnRef: MutableRefObject<(fn: () => Promise<T>) => void>;
}
export declare function usePromiseState<T>(_promiseFn: () => Promise<T>, { errorMonitor, onError, }: {
    errorMonitor: ErrorMonitor;
    onError?: (params: {
        err: unknown;
        isOnline: boolean;
    }) => unknown;
}): PromiseState<T>;
//# sourceMappingURL=usePromiseState.d.ts.map