@dxos/echo
    Preparing search index...

    Function getChanges

    • The object's edit history, oldest first: one Change.Change per document change that touched the object, carrying its snapshot before and after. Given property, only the changes that touched that property, carrying its value. Pass an entry's heads to getVersion to read the whole object as that change left it.

      Changes belong to the object's Automerge document, so time, actor and ops describe the whole change, which may also have written other objects in the same document. Edits to the content of a referenced object (e.g. a Ref<Text>) are that object's history, not this one's.

      Type Parameters

      Parameters

      • obj: T

      Returns Change.Change<Obj.Snapshot<T>>[]

      for (const { time, before, after } of Obj.getChanges(task, { property: 'status' })) {
      console.log(new Date(time), before, '→', after);
      }

      O(document history): diffs every change of the Automerge document and snapshots each match; not cached.

    • The object's edit history, oldest first: one Change.Change per document change that touched the object, carrying its snapshot before and after. Given property, only the changes that touched that property, carrying its value. Pass an entry's heads to getVersion to read the whole object as that change left it.

      Changes belong to the object's Automerge document, so time, actor and ops describe the whole change, which may also have written other objects in the same document. Edits to the content of a referenced object (e.g. a Ref<Text>) are that object's history, not this one's.

      Type Parameters

      Parameters

      Returns Change.Change<Obj.Snapshot<T>[K]>[]

      for (const { time, before, after } of Obj.getChanges(task, { property: 'status' })) {
      console.log(new Date(time), before, '→', after);
      }

      O(document history): diffs every change of the Automerge document and snapshots each match; not cached.