findDivergencePoint
constfindDivergencePoint: ({ existingEvents, incomingEvents, isEqualEvent, isClientEvent, ignoreClientEvents, }) =>number
Defined in: packages/@livestore/common/dist/sync/syncstate.d.ts:255
Gets the index relative to existingEvents where the divergence point is
by comparing each event in existingEvents to the corresponding event in incomingEvents
Parameters
Section titled “Parameters”{ existingEvents, incomingEvents, isEqualEvent, isClientEvent, ignoreClientEvents, }
Section titled “{ existingEvents, incomingEvents, isEqualEvent, isClientEvent, ignoreClientEvents, }”existingEvents
Section titled “existingEvents”ReadonlyArray<EncodedWithMeta>
ignoreClientEvents
Section titled “ignoreClientEvents”boolean
incomingEvents
Section titled “incomingEvents”ReadonlyArray<EncodedWithMeta>
isClientEvent
Section titled “isClientEvent”(event) => boolean
isEqualEvent
Section titled “isEqualEvent”(a, b) => boolean
Returns
Section titled “Returns”number