sync
namespace syncFunctions
deleteData(): Promise<boolean>
Deletes the stored document and turns syncing off on this device, so it is not uploaded again. Other devices keep what they have installed.
Returns
Whether the document was deleted. Failures are recorded as lastError.
isApplying(): boolean
Returns
Whether a sync is applying remote changes right now, so the changes it makes can be told apart.
isEnabled(): boolean
Returns
Whether this device syncs automatically.
now(strategy?: SyncStrategy): Promise<boolean>
Syncs now: reads the stored document, merges, applies remote changes here and saves the result. A call while a sync runs queues one more run after it, in this device's mode.
Returns
Whether the sync succeeded. Failures are recorded as lastError in SYNC_STORE.
resolveFirstSync(strategy: SyncStrategy): Promise<boolean>
Settles how this device and an existing cloud setup combine on the first sync after signing in, then turns automatic syncing on.
Returns
Whether the sync succeeded.
setEnabled(enabled: boolean): void
Turns automatic syncing on or off, syncing right away when turned on.
Types
Which way automatic syncs move changes on this device.
How one sync reconciles the two sides: merge keeps changes from both, pull makes this device
match the cloud, and push makes the cloud match this device.
Variables
SYNC_STORE: "unbound::sync"
The settings store Sync keeps its mode and last agreed document in. Never synced.