diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index bbafa0301c..36f05a7058 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -228,6 +228,25 @@ declare namespace Bull { * Takes a lock for this job so that no other queue worker can process it at the same time. */ takeLock(): Promise; + + /** + * Get job properties as Json Object + */ + toJSON(): { + id: JobId, + name: string, + data: T, + opts: JobOptions, + progress: number, + delay: number, + timestamp: number, + attemptsMade: number, + failedReason: string, + stacktrace: string[] | null, + returnvalue: any, + finishedOn: number | null, + processedOn: number | null + }; } type JobStatus = 'completed' | 'waiting' | 'active' | 'delayed' | 'failed';