merge
constmerge: (args_0) =>Effect.Effect<MergeResultAdvance|MergeResultRebase|MergeResultReject,never,never>
Defined in: packages/@livestore/common/dist/sync/syncstate.d.ts:152
Parameters
Section titled “Parameters”args_0
Section titled “args_0”ignoreClientOnlyEvents?
Section titled “ignoreClientOnlyEvents?”boolean
This is used in the leader which should ignore client events when receiving an upstream-advance payload
isClientOnlyEvent
Section titled “isClientOnlyEvent”(event) => boolean
LiveStoreEvent.Client.EncodedWithMeta does not carry the event definition’s
clientOnly flag. The caller supplies this schema-aware predicate so merge
can preserve the correct sequence-number shape when rebasing: client-only
events advance the client component, synced events advance the global component.
isEqualEvent
Section titled “isEqualEvent”(a, b) => boolean
Pending events are confirmed by comparing their logical encoded identity with upstream events. This is caller-supplied because comparing encoded args may require event-schema knowledge that the generic merge algorithm does not own. Implementations should ignore transport/runtime metadata.
payload
Section titled “payload”typeof Payload.Type
syncState
Section titled “syncState”Returns
Section titled “Returns”Effect.Effect<MergeResultAdvance | MergeResultRebase | MergeResultReject, never, never>