import { EventForwarder , doIfNotDisposed } from "@fluidframework/common-utils" ; import { ICommittedProposal , IQuorum , IQuorumEvents , ISequencedClient , } from "@fluidframework/protocol-definitions" ; /**
 * Proxies Quorum events.
 */ export class QuorumProxy extends EventForwarder < IQuorumEvents > implements IQuorum { public readonly propose : ( key : string , value : any ) => Promise < void > ; public readonly has : ( key : string ) => boolean ; public readonly get : ( key : string ) => any ; public readonly getApprovalData : ( key : string ) => ICommittedProposal | undefined ; public readonly getMembers : ( ) => Map < string , ISequencedClient > ; public readonly getMember : ( clientId : string ) => ISequencedClient | undefined ; constructor ( quorum ) { super ( quorum ) ; super . setMaxListeners ( 50 ) ; this . propose = doIfNotDisposed ( this , quorum . propose . bind ( quorum ) ) ; this . has = doIfNotDisposed ( this , quorum . has . bind ( quorum ) ) ; this . get = doIfNotDisposed ( this , quorum . get . bind ( quorum ) ) ; this . getApprovalData = doIfNotDisposed ( this , quorum . getApprovalData . bind ( quorum ) ) ; this . getMembers = doIfNotDisposed ( this , quorum . getMembers . bind ( quorum ) ) ; this . getMember = doIfNotDisposed ( this , quorum . getMember . bind ( quorum ) ) ; } }