Automerge Repo - v2.6.0-alpha.0
    Preparing search index...

    Type Alias ShareConfig

    A type which determines whether we should share a document with a peer

    type ShareConfig = {
        access: (peerId: PeerId, documentId?: DocumentId) => Promise<boolean>;
        announce: SharePolicy;
    }
    Index

    Properties

    Properties

    access: (peerId: PeerId, documentId?: DocumentId) => Promise<boolean>

    Whether a peer should have access to the document

    announce: SharePolicy

    Whether we should actively announce a document to a peer

    This functions is called after checking the access policy to determine whether we should announce a document to a connected peer. For example, a tab connected to a sync server might want to announce every document to the sync server, but the sync server would not want to announce every document to every connected peer