/// <reference types="react" />
/**
 * This callback should return a boolean that indicates if the pooling has finished (true) or it should continue (false)
 */
type PoolingAction = () => Promise<boolean>;
/**
 * A hook that helps repeatedly check for updates at set intervals.
 * It runs a function over and over until it says it's done or stops.
 */
export default function usePooling(intervalMs?: number, maxPoolingTime?: number | null): {
    failed: boolean;
    setFailed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
    isPooling: boolean;
    /**
     * Start checking repeatedly by running your function.
     * Keep going until your function says it's finished or the check stops.
     * @param cb {@link PoolingAction} - Executes and returns if has finished (true) or not (false)
     */
    startPolling: (cb: PoolingAction) => () => void;
    stop: () => void;
};
export {};
