EventSubscriber<T>
Allows attaching event handlers.
Type Parameters
• T extends unknown
[]
Properties
last?
ts
readonly optional last: [...T[]];
In case event was broadcast at least once, returns last payload; undefined otherwise.
Defined in
subscribe()
ts
subscribe: (handler) => string;
Attaches specified handler for events emitted by this event instance.
Parameters
• handler
The handler to attach.
Returns
string
Defined in
unsubscribe()
ts
unsubscribe: (handler) => void;
Detaches specified handler from events emitted by this event instance.
Parameters
• handler
The handler to detach.
Returns
void