EventEmitterWithErrorHandling Class
Event Emitter helper class
WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.
Signature
export declare class EventEmitterWithErrorHandling<TEvent extends IEvent = IEvent> extends TypedEventEmitter<TEvent>
Extends: TypedEventEmitter<TEvent>
Type Parameters
Parameter | Constraint | Default | Description |
---|---|---|---|
TEvent | IEvent | IEvent |
Remarks
Any exceptions thrown by listeners will be caught and raised through "error" event. Any exception thrown by "error" listeners will propagate to the caller.
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(errorHandler) | Alpha |
Constructs a new instance of the EventEmitterWithErrorHandling class |
Constructor Details
(constructor)
Constructs a new instance of the EventEmitterWithErrorHandling
class
WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.
Signature
constructor(errorHandler: (eventName: EventEmitterEventType, error: any) => void);
Parameters
Parameter | Type | Description |
---|---|---|
errorHandler | (eventName: EventEmitterEventType, error: any) => void |