Skip to content

merge

const merge: (args_0) => Effect.Effect<MergeResultAdvance | MergeResultRebase | MergeResultReject, never, never>

Defined in: packages/@livestore/common/dist/sync/syncstate.d.ts:152

boolean

This is used in the leader which should ignore client events when receiving an upstream-advance payload

(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.

(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.

typeof Payload.Type

SyncState

Effect.Effect<MergeResultAdvance | MergeResultRebase | MergeResultReject, never, never>