/** * @rlanz/bull-queue * * @license MIT * @copyright Romain Lanz */ import { Job } from '../job.js'; import type { ConnectionOptions, WorkerOptions, QueueOptions, JobsOptions } from 'bullmq'; export type AllowedJobTypes = JobHandlerConstructor | (() => Promise<{ default: JobHandlerConstructor; }>); export type QueueConfig = { queueNames?: string[]; defaultConnection: ConnectionOptions; queue: Omit & { connection?: ConnectionOptions; }; worker: Omit & { connection?: ConnectionOptions; }; jobs: JobsOptions; }; export type InferJobPayload = Parameters['handle']>[0]; export interface JobHandlerConstructor { $$filepath: string; new (...args: any[]): Job; }