UNPKG

@nowarajs/typed-event-emitter

Version:

Typed Event Emitter is a TypeScript library that provides a strongly typed event emitter, allowing developers to define custom events with specific payloads, ensuring type safety and reducing runtime errors in event-driven applications.

7 lines (6 loc) 214 B
/** * Defines a map of event names to their payload types. * @remarks * Use this interface to specify the shape of events for TypedEventEmitter. */ export type EventMap = Record<string | number | symbol, any>;