Arbitrary metadata associated with the patch, which is not used by the library.
Readonly
opsA list of operations in the patch.
Returns the patch ID, which is equal to the ID of the first operation in the patch.
The ID of the first operation in the patch.
The .rebase() operation is meant to work only with patch that use the server clock. When receiving a patch from a client, the starting ID of the patch can be out of sync with the server clock. For example, if some other user has in the meantime pushed operations to the server.
The .rebase() operation returns a new Patch
with the IDs recalculated
such that the first operation has ID of the patch is equal to the
actual server time tip.
Real server time tip (ID of the next expected operation).
Creates a new patch where all timestamps are transformed using the provided function.
Timestamp transformation function.
A new patch with transformed timestamps.
Static
from
Represents a JSON CRDT patch.
Normally, you would create a new patch using the PatchBuilder class.
Save patch to a binary representation:
Load patch from a binary representation: