import { ConsensusResult , IConsensusOrderedCollection , } from "./interfaces" ; /**
 * Helper method to acquire and complete an item
 * Should be used in test code only
 */ export async function acquireAndComplete < T > ( collection ) { let res ; await collection . acquire ( async ( value ) => { res = value ; return ConsensusResult . Complete ; } ) ; return res ; } /**
 * Helper method to acquire and complete an item
 * Should be used in test code only
 */ export async function waitAcquireAndComplete < T > ( collection ) { let res ; await collection . waitAndAcquire ( async ( value ) => { res = value ; return ConsensusResult . Complete ; } ) ; return res as T ; }