import { JobRecipient } from './recipient.ts';
import type { JobStatus } from './index.ts';
import type { AbortOptions } from 'abort-error';
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