Home > @idealeap/pipeline > EventEmitter
EventEmitter class
A simple implementation of an event emitter.
The EventEmitter
class provides methods to subscribe to events (on
) and to trigger those events (emit
).
Signature:
typescript
export declare class EventEmitter
export declare class EventEmitter
Methods
Method | Modifiers | Description |
---|---|---|
emit(event, args) | Emits a specified event with the provided arguments, invoking all subscribed listeners for that event. | |
on(event, listener) | Subscribes a listener function to a specified event. |