Interface: StateNamespace
@roomful/svelte / StateNamespace
Interface: StateNamespace
Section titled “Interface: StateNamespace”Defined in: packages/svelte/src/index.ts:787
Exposes shared-state helpers for the adapter.
Methods
Section titled “Methods”shared()
Section titled “shared()”shared<
T>(key,options): readonly [Writable<T>, (nextValue) =>void]
Defined in: packages/svelte/src/index.ts:796
Creates or reuses a shared-state binding.
Type Parameters
Section titled “Type Parameters”T
The shared state value type.
Parameters
Section titled “Parameters”string
The logical binding key used to reuse the same shared-state engine.
options
Section titled “options”StateOptions<T>
The shared-state configuration, including initialValue.
Returns
Section titled “Returns”readonly [Writable<T>, (nextValue) => void]
A Svelte writable store and setter pair.