UNPKG

1.38 kBTypeScriptView Raw
1import { DoneCallback, Job } from 'bull';
2import { BullQueueAdvancedProcessor, BullQueueAdvancedSeparateProcessor } from './interfaces/bull.interfaces';
3export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
4 [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
5}[Keys];
6export declare type BullQueueProcessor = BullQueueProcessorCallback | BullQueueAdvancedProcessor | BullQueueSeparateProcessor | BullQueueAdvancedSeparateProcessor;
7export declare type BullQueueProcessorCallback = (job: Job, done?: DoneCallback) => void;
8export declare type BullQueueSeparateProcessor = string;
9export declare type BullQueueEvent = 'error' | 'waiting' | 'active' | 'stalled' | 'progress' | 'completed' | 'failed' | 'paused' | 'resumed' | 'cleaned' | 'drained' | 'removed' | 'global:error' | 'global:waiting' | 'global:active' | 'global:stalled' | 'global:progress' | 'global:completed' | 'global:failed' | 'global:paused' | 'global:resumed' | 'global:cleaned' | 'global:drained' | 'global:removed';
10export declare type BullQueueEventOptions = RequireOnlyOne<{
11 eventName: BullQueueEvent;
12 name?: string;
13 id?: string;
14}, 'id' | 'name'>;
15export declare type QueueEventDecoratorOptions = RequireOnlyOne<{
16 id?: string;
17 name?: string;
18}, 'id' | 'name'>;
19//# sourceMappingURL=bull.types.d.ts.map
\No newline at end of file