diff --git a/types/bull/bull-tests.tsx b/types/bull/bull-tests.tsx index cd733a6482..55f65f43d9 100644 --- a/types/bull/bull-tests.tsx +++ b/types/bull/bull-tests.tsx @@ -250,3 +250,8 @@ new Queue('profile'); new Queue('profile', 'url'); new Queue('profile', { prefix: 'test' }); new Queue('profile', 'url', { prefix: 'test' }); + +// Use low-level API +const multi = myQueue.multi(); +multi.del(myQueue.toKey('repeat')); +multi.exec(); diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 98315611d6..bec7be8986 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -746,6 +746,16 @@ declare namespace Bull { */ clean(grace: number, status?: JobStatusClean, limit?: number): Promise>>; + /** + * Returns a promise that marks the start of a transaction block. + */ + multi(): Redis.Pipeline; + + /** + * Returns the queue specific key. + */ + toKey(queueType: string): string; + /** * Listens to queue events */