import { TaskStatus } from '../model';
type TaskFunc<T> = () => Promise<T>;
type TaskErrorFunc = (error: unknown) => unknown;
export declare class TaskState<T> {
    status: TaskStatus<T, unknown>;
    _fn?: TaskFunc<T>;
    _onError?: TaskErrorFunc;
    constructor();
    runOnce(fn?: TaskFunc<T>, onError?: TaskErrorFunc): Promise<void> | undefined;
    get errorStatus(): import("../model").TaskStatusError<T, unknown> | undefined;
    reset(): void;
    run(fn: TaskFunc<T>, onError?: TaskErrorFunc): Promise<void>;
}
export {};
//# sourceMappingURL=TaskState.d.ts.map