Skip to main content

Interface: IEventsApi

Defined in: Extensions/ExtensionApiTypes.ts:596

Wraps the cross-cutting subscription model so extensions can subscribe to host-emitted hook events (the ~30 hooks listed in ExtensionPointTypes.ts).

The host wraps every emit with a try/catch and a 2-second timeout per subscriber; a slow or throwing subscriber gets its handle disposed with a logged warning, but never blocks the host or other subscribers.

Methods

subscribe()

subscribe<T>(channel, handler): Promise<DisposableHandle>

Defined in: Extensions/ExtensionApiTypes.ts:597

Type Parameters

T

T

Parameters

channel

ExtensionPointId

handler

(payload) => void | Promise<void>

Returns

Promise<DisposableHandle>