PQueue has no `on` method
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
const queue = new PQueue({
concurrency: 10,
})
queue.on("next", async () => {console.log('next')})
throw the error:
error: Uncaught (in promise) TypeError: queue.on is not a function
The readme seems to have been taken from the node version. The on method exists on Node's EventEmitter, but in this Deno version, this has been swapped out for EventTarget which has no on method. This package should either bring in Node's EventEmitter (import { EventEmitter } from 'node:events';) or the README should be adjusted to use addEventListener instead of on.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the README's queue.on example with the Deno implementation's EventTarget API. Decide whether the package should expose Node's EventEmitter or document addEventListener, then verify that the README example matches the supported API and works in Deno.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100