Skip to content

Promise-based events.once in typed-emitter #24

@leumasme

Description

@leumasme

Does typed-emitter have support for the "once" function of the "events" inbuilt package?
nodejs/node#26078
Used like this:

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions