Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing types for Worker event listeners #523

Closed
m-ronchi opened this issue May 4, 2021 · 1 comment
Closed

missing types for Worker event listeners #523

m-ronchi opened this issue May 4, 2021 · 1 comment

Comments

@m-ronchi
Copy link
Contributor

m-ronchi commented May 4, 2021

Worker class does not have signatures for its event listeners, therefore it always defaults to EventEmitter's on(event: string | symbol, listener: (...args: any[]) => void): this;.

for comparison, both bull 3 queue (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/bull/index.d.ts#L797 / https://github.com/taskforcesh/bullmq/blob/master/src/classes/compat.ts#L430) and QueueEvents (https://github.com/taskforcesh/bullmq/blob/master/src/classes/queue-events.ts#L6) have them

@roggervalf
Copy link
Collaborator

@m-ronchi please try the last version, it should have event listener typing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants