@automerge/automerge - v3.1.1
    Preparing search index...

    Function generateSyncMessage

    • Generate a sync message to send to the peer represented by inState

      Type Parameters

      • T

      Parameters

      • doc: Doc<T>

        The doc to generate messages about

      • inState: SyncState

        The SyncState representing the peer we are talking to

      Returns [SyncState, null | SyncMessage]

      An array of [newSyncState, syncMessage | null] where newSyncState should replace inState and syncMessage should be sent to the peer if it is not null. If syncMessage is null then we are up to date.