Skip to main content
Module

x/automerge/index.ts>applyChanges

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Go to Latest
function applyChanges
import { applyChanges } from "https://deno.land/x/automerge@2.2.0/index.ts";

Apply changes received from another document

doc will be updated to reflect the changes. If there are changes which we do not have dependencies for yet those will be stored in the document and applied when the depended on changes arrive.

You can use the ApplyOptions to pass a patchcallback which will be informed of any changes which occur as a result of applying the changes

Parameters

doc: Doc<T>
changes: Change[]
optional
opts: ApplyOptions<T>