import * as automerge from "https://deno.land/x/automerge@2.2.2/stable.ts";
Classes
The most basic CRDT: an integer value that can be changed only by incrementing and decrementing. Since addition of integers is commutative, the value trivially converges. | |
c Int | |
c Text | |
c Uint |
Functions
Apply changes received from another document | |
Update the contents of an automerge document | |
Make a change to the document as it was at a particular point in history | |
Make a full writable copy of an automerge document | |
Decode some binary data into a SyncState | |
Function for use in change which deletes values from a list at a given index | |
f diff | Create a set of patches representing the change from one set of heads to another |
f dump | |
Make a change to a document which does not modify the document | |
encode a SyncState into binary to send over the network | |
f free | Explicity free the memory backing a document. Note that this is note
necessary in environments which support
|
f from | Create an automerge document from a POJO |
Generate a sync message to send to the peer represented by | |
Get the actor ID associated with the document | |
Get all the changes in a document | |
Get the changes which are in | |
Get the conflicts associated with a property | |
Get the hashes of the heads of this document | |
Get the binary representation of the last change which was made to this doc | |
Get any changes in | |
Return the object ID of an arbitrary javascript value | |
f init | Create a new automerge document |
Create a new, blank SyncState | |
Function for use in change which inserts values into a list at a given index | |
f load | Load an automerge document from a compressed document produce by save |
Load changes produced by saveIncremental, or partial changes | |
Merge | |
Update a document and our sync state on receiving a sync message | |
f save | Export the contents of a document to a compressed format |
Create binary save data to be appended to a save file or fed into loadIncremental | |
f toJS | |
f use | |
f view | Make an immutable view of an automerge document as at |
Interfaces
I List | A List is an extended Array that adds the two helper methods |
Type Aliases
T API | |
Options passed to loadIncremental, applyChanges, and receiveSyncMessage | |
The type returned from changeAt | |
Function which is called by change when making changes to a | |
Options passed to change, and emptyChange | |
The type of conflicts for particular key or index | |
T Doc | An automerge document. |
Callback which is called by various methods in this library to notify the user of what changes have been made. | |
T Prop | |
An opaque type tracking the state of sync with a remote peer |