loadSnapshotIntoStorage

See source code

Loads a snapshot into storage during a transaction. Migrates the snapshot to the current schema and loads it into storage.

function loadSnapshotIntoStorage<R extends UnknownRecord>(
  txn: TLSyncStorageTransaction<R>,
  schema: StoreSchema<R, any>,
  snapshot: RoomSnapshot | TLStoreSnapshot
): void

Parameters

NameDescription

txn

The transaction to load the snapshot into

schema

StoreSchema<R, any>

The current schema

snapshot

The snapshot to load

Returns

void
Prev
useSyncDemo
Next
centerSelectionAroundPoint