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

Queue.push return type should be Promise<void> | void, not just void #84

Open
SishaarRao opened this issue Oct 27, 2022 · 0 comments
Open

Comments

@SishaarRao
Copy link

In the documentation for queue, it is stated that the anonymous function pushed to the queue can return a promise. However, if you look at the definition for QueueWorker, it has a return type of just void

export interface QueueWorker {
    (callback?: QueueWorkerCallback): void;

This causes a failure by the ESLint rule no-misused-promises

Promise returned in function argument where a void return was expected  @typescript-eslint/no-misused-promises

This type definition should be updated to be Promise<void> | void

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

1 participant