js-bao-wss-client / CreateOfflineOptions
Interface: CreateOfflineOptions
Options for creating a document offline.
Deprecated
Use CreateDocumentOptions with localOnly: true instead.
Properties
initialContent?
optionalinitialContent?: (ydoc) =>void|Promise<void>
Callback to populate the Yjs document with initial content before persistence.
Parameters
ydoc
Doc
Returns
void | Promise<void>
offlineWritePolicy?
optionalofflineWritePolicy?:"ifLastKnownWrite"|"always"|"never"
Controls when offline writes are persisted: "ifLastKnownWrite" only writes if the local state is the latest, "always" always writes, "never" never writes.
retainLocal?
optionalretainLocal?:boolean
If true, retains the local copy after the document is closed.
startNetwork?
optionalstartNetwork?:"manual"|"immediate"|"afterIndexedDb"
Controls when network sync starts: "immediate" starts right away, "afterIndexedDb" waits for local persistence, "manual" requires explicit start.
title?
optionaltitle?:string
The display title for the new document.
waitForIndexedDb?
optionalwaitForIndexedDb?:boolean
If true, waits for IndexedDB persistence to complete before resolving.