tootallnate

tootallnate/once

Creates a Promise that waits for a single event

TypeScript
28
8
MIT License

The `@tootallnate/once` library creates a strongly-typed Promise that resolves when a specific event is emitted by an EventEmitter, rejecting if an error event occurs first. It is designed for TypeScript developers working with Node.js event-driven code who want type-safe, awaitable event handling. The Promise is automatically typed based on the event name and emitter, making it easier to handle events like process exit or child process messages without manual type casting.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies of tootallnate/once

Account's avatar
TypeScript definitions for jest
Account's avatar
TypeScript definitions for node
Account's avatar
An implementation of WHATWG AbortController interface.
Account's avatar
Delightful JavaScript Testing.
Account's avatar
A deep deletion module for node (like `rm -rf`)
Account's avatar
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript
Account's avatar
TypeScript is a language for application scale JavaScript development

Support the repos that depend on this repository

Top contributors

TooTallNate's profile
TooTallNate
26 contributions
lewish's profile
lewish
1 contributions
vivekkj123's profile
vivekkj123
1 contributions
github-actions[bot]'s profile
github-actions[bot]
1 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet