Sync / foldkit-durable

AppendResult

type · packages/durable/src/journal.ts:228

type AppendResult<Operation> =
  | {
      readonly _tag: 'Committed'
      readonly committed: Committed<Operation>
    }
  | {
      readonly _tag: 'AlreadyCommitted'
      readonly opId: OpId
      readonly sequence: Sequence
      readonly actorId: ActorId
    }

The outcome of append. AlreadyCommitted means the operation is known but its payload was compacted away, so no Committed operation can be returned; a caller must not treat the retransmitted content as the committed one.