import { Operation, Exchange } from '@urql/core';

/** Input parameters for the {@link refetchIntervalExchange}. */
interface Options {
    /**
     * The time to wait before refetching a query, in milliseconds.
     *
     * @defaultValue `300_000` - 5 min
     */
    refetchInterval?: boolean | number | ((op: Operation) => number | boolean);
}
/** Exchange factory that refetches all queries on an interval.
 *
 * @param options - An {@link Options} configuration object.
 * @returns the created refetch-interval {@link Exchange}.
 *
 * @example
 * ```ts
 * refetchIntervalExchange({
 *   // Refetch every second.
 *   refetchInterval: 1000,
 * });
 * ```
 */
declare const refetchIntervalExchange: (options: Options) => Exchange;

export { type Options, refetchIntervalExchange };
