Skip to main content

Interface: SharedStoreOptions

Extends

Properties

accept?

optional accept?: (meta) => boolean;

Gatekeeper for incoming remote writes (patches and snapshot merges): return false to ignore them. Lets callers delimit how much is shared — e.g. accept only writes from other tabs, not from workers.

Parameters

ParameterType
metaMessageMeta

Returns

boolean


kind?

optional kind?: PeerKind;

What this client announces itself as. Defaults to 'worker' when there is no document, else 'tab'.

Inherited from

CommonOptions.kind


persist?

optional persist?: PersistOptions;

Restore this store on creation and write it back as it changes.


transport?

optional transport?: (name) => Transport;

Transport factory, mainly for tests. Defaults to defaultTransport.

Parameters

ParameterType
namestring

Returns

Transport

Inherited from

CommonOptions.transport