andywer / andywer/typed-emitter

Promise-based events.once in typed-emitter

Open
#24 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
285
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Does typed-emitter have support for the "once" function of the "events" inbuilt package?
https://github.com/nodejs/node/pull/26078
Used like this:
```typescript
import { once } from "events"
// ...
await once(emitter, "event");
```
This is not typed, and its not even a function on the EventEmitter - is there a clean way to type this without reimplementing the promise-based `once` function?
Thanks for your work on this package!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.