import { JobRecipient } from './recipient.ts';
import type { JobStatus } from './index.ts';
import type { AbortOptions } from '@libp2p/interface';
import type { ProgressOptions } from 'progress-events';
export interface JobTimeline {
    created: number;
    started?: number;
    finished?: number;
}
export declare class Job<JobOptions extends AbortOptions & ProgressOptions = AbortOptions, JobReturnType = unknown> {
    id: string;
    fn: (options: JobOptions) => Promise<JobReturnType>;
    options: JobOptions;
    recipients: Array<JobRecipient<JobReturnType>>;
    status: JobStatus;
    readonly timeline: JobTimeline;
    private readonly controller;
    private dispatchingProgress;
    constructor(fn: (options: JobOptions) => Promise<JobReturnType>, options: any);
    abort(err: Error): void;
    onAbort(): void;
    join(options?: Partial<Pick<JobOptions, 'signal' | 'onProgress'>>): Promise<JobReturnType>;
    run(): Promise<void>;
    cleanup(): void;
}
//# sourceMappingURL=job.d.ts.map