Skip to content
Roomful is in public beta — install with the @beta tag. Share feedback →

Interface: EventChannelStore\<TPayload, TPresence\>

@roomful/svelte


@roomful/svelte / EventChannelStore

Interface: EventChannelStore<TPayload, TPresence>

Section titled “Interface: EventChannelStore<TPayload, TPresence>”

Defined in: packages/svelte/src/index.ts:282

Readable event channel store augmented with emit helpers.

TPayload = unknown

The event payload type.

TPresence extends PresenceData = PresenceData

The room presence shape.

emit(payload): void

Defined in: packages/svelte/src/index.ts:292

Broadcasts an event on the bound channel.

TPayload

The payload to send.

void

Nothing.


emitTo(peerId, payload): void

Defined in: packages/svelte/src/index.ts:301

Sends an event on the bound channel to a specific peer.

string

The target peer identifier.

TPayload

The payload to send.

void

Nothing.


subscribe(this, run, invalidate?): Unsubscriber

Defined in: node_modules/.pnpm/svelte@4.2.20/node_modules/svelte/types/index.d.ts:1619

Subscribe on value changes.

void

Subscriber<EventChannelValue<TPayload, TPresence> | null>

subscription callback

Invalidator<EventChannelValue<TPayload, TPresence> | null>

cleanup callback

Unsubscriber

Readable.subscribe