Interface: PresenceStore\<TPresence\>
@roomful/svelte / PresenceStore
Interface: PresenceStore<TPresence>
Section titled “Interface: PresenceStore<TPresence>”Defined in: packages/svelte/src/index.ts:158
Readable presence store augmented with write helpers.
Extends
Section titled “Extends”Readable<PresenceStoreValue<TPresence>>
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
The room presence shape.
Methods
Section titled “Methods”replace()
Section titled “replace()”replace(
value):void
Defined in: packages/svelte/src/index.ts:167
Replaces the local presence payload.
Parameters
Section titled “Parameters”Partial<TPresence>
The presence payload to publish.
Returns
Section titled “Returns”void
Nothing.
set(
value):void
Defined in: packages/svelte/src/index.ts:175
Partially updates the local presence payload.
Parameters
Section titled “Parameters”Partial<TPresence>
The partial presence payload to merge.
Returns
Section titled “Returns”void
Nothing.
subscribe()
Section titled “subscribe()”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.
Parameters
Section titled “Parameters”void
Subscriber<PresenceStoreValue<TPresence>>
subscription callback
invalidate?
Section titled “invalidate?”Invalidator<PresenceStoreValue<TPresence>>
cleanup callback
Returns
Section titled “Returns”Unsubscriber
Inherited from
Section titled “Inherited from”Readable.subscribe
update()
Section titled “update()”update(
updater):void
Defined in: packages/svelte/src/index.ts:183
Updates the local presence payload from the previous value.
Parameters
Section titled “Parameters”updater
Section titled “updater”Updater<Partial<TPresence>>
The updater that returns the next partial presence payload.
Returns
Section titled “Returns”void
Nothing.