@sovereignbase/convergent-replicated-list
    Preparing search index...

    Function __update

    Exports the local mutation primitive.

    • Applies a local value mutation to the replica live view.

      The update can replace a range starting at the target item, insert values before it, or insert values after it. The returned delta is suitable for gossip and the returned change describes the local live-view patch.

      Type Parameters

      • T

      Parameters

      • listIndex: number

        Target index in the live list.

      • listValues: T[]

        Values to insert or overwrite.

      • replica: CRListState<T>

        Replica to mutate.

      • mode: "overwrite" | "before" | "after"

        Mutation mode relative to listIndex.

      Returns false | { change: CRListChange<T>; delta: CRListDelta<T> }

      • A local change and gossip delta, or false if no mutation occurred.