Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#33121 from pc-jedi/bull-eventemitter
Browse files Browse the repository at this point in the history
[bull] Queue extends EventEmitter
  • Loading branch information
amcasey authored Feb 19, 2019
2 parents 0633d06 + f756a48 commit d751a6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions types/bull/bull-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ pdfQueue
.on('drained', () => undefined)
.on('removed', (job: Queue.Job) => undefined);

pdfQueue.setMaxListeners(42);

// test different process methods

const profileQueue = new Queue('profile');
Expand Down
3 changes: 2 additions & 1 deletion types/bull/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// TypeScript Version: 2.8

import * as Redis from "ioredis";
import { EventEmitter } from "events";

/**
* This is the Queue constructor.
Expand Down Expand Up @@ -384,7 +385,7 @@ declare namespace Bull {
next: number;
}

interface Queue<T = any> {
interface Queue<T = any> extends EventEmitter {
/**
* The name of the queue
*/
Expand Down

0 comments on commit d751a6c

Please sign in to comment.