Signature
Class TypedEventEmitterType parameters
| Name | Constraint | Default | Description |
|---|---|---|---|
M | object | None | No type parameter summary yet. |
Constructors
| Name | Signature | Description |
|---|---|---|
constructor | constructor(): TypedEventEmitter<M> | No constructor summary yet. |
Methods
| Name | Signature | Description |
|---|---|---|
emit | emit(event: K, args: undefined): void | Emits a typed event to all active subscribers. Supports type-safety by enforcing key-value mapping and allows omitting the payload argument entirely if the map type is void. |
on | on(event: K, callback: (payload: indexedAccess) => void): () => void | Subscribes to a typed event. |