type Task<T> = () => Promise<T>;
type CancellableTaskOptions = {
    repeatEvery: number;
    abort: AbortController;
    repeatFailureOnly?: boolean;
};
export declare class CancellableTask<T> {
    private period?;
    private controller;
    private cancellationToken;
    private timer?;
    constructor(task: Task<T>, options: CancellableTaskOptions);
    private clearTimer;
    private loopOnTaskEvery;
    cancel(): void;
    then(): Promise<T>;
    callback(fn: (response: T) => void): Promise<void>;
}
export {};
