For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/interfaces/EventSink.md.

Interface: EventSink<T>

event

Beta

An event that can be subscribed to. You can use the token, returned from the subscribe method, to clean up handlers.

Type Parameters

T

T

Methods

subscribe()

subscribe(handler): IEventToken

Beta

Parameters

handler

EventHandler<T>

Handler function to subscribe with.

Returns

IEventToken

An event handler subscription token that can be used to unsubscribe and clean-up handlers.

Remarks

Subscribes an event handler to a particular subscription.

同领域相关