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