Skip to main content

Type Alias: StreamEventCallbacks

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / StreamEventCallbacks

Type Alias: StreamEventCallbacks

StreamEventCallbacks = { [K in keyof typeof STREAM_CALLBACK_EVENTS]?: (event: RealtimeEventPayloads[typeof STREAM_CALLBACK_EVENTS[K]]) => void | Promise<void> }

Defined in: packages/launchpad-sdk/dist/services/realtime/event-catalog.d.ts:427

Callbacks for stream events, one optional onX per event. Passed to subscribeToStream(token, callbacks) they become subscribers of that token (and the room is joined for as long as one of them is registered); passed to connectStreamWebSocket(callbacks) they become subscribers of the event on every token. Each registered callback is its own subscriber: no callback replaces another.