Automerge Repo - v2.6.0-alpha.1
    Preparing search index...

    Interface DocHandleChangePayload<T>

    Emitted when this document has changed

    interface DocHandleChangePayload<T> {
        doc: undefined | Automerge.Doc<T>;
        handle: DocHandle<T>;
        patches: Automerge.Patch[];
        patchInfo: Automerge.PatchInfo<T>;
        scopeReplaced: boolean;
    }

    Type Parameters

    • T
    Index

    Properties

    doc: undefined | Automerge.Doc<T>

    The value after the change, scoped to this handle. For a root handle this is the whole document; for a sub-handle it is the value at the handle's path (i.e. equal to handle.doc()). undefined when the change removed the handle's scope.

    handle: DocHandle<T>

    The handle that changed

    patches: Automerge.Patch[]

    The patches representing the change, with paths relative to this handle's scope. For a root handle these are whole-document paths; for a sub-handle they are re-rooted at the handle's path.

    patchInfo: Automerge.PatchInfo<T>

    Information about the change. Note: before/after here are whole-document snapshots, not scoped.

    scopeReplaced: boolean

    true when the change replaced or removed this handle's scope wholesale (a change at or above the scope boundary). Fine-grained consumers should reconcile from doc rather than apply patches in this case. Always false for a root handle.