import { Ref, RefTypes } from './ref'; /** * A work queue * @private */ export interface Queue { queue(item: T): Ref; numUnprocessed(): number; drain(cb: (ref: Ref, item: T, ohterInfo?: OtherInfo) => void): { processedCount: number; }; drainUntilEmpty(cb: (ref: Ref, item: T) => void): { processedCount: number; }; } /** * Create a new work queue for a type of entity * * @param k the name of the entity type * @param getIdInfo function used to generate id-data from an object * @param extractId function used to extract an id from id-data * @private */ export declare function createQueue, T extends object, IDInfo = string, OtherInfo = undefined>(k: K, getIdInfo: (t: T) => IDInfo, extractId?: (info: IDInfo) => { id: string; otherInfo?: OtherInfo; }): Queue; //# sourceMappingURL=queue.d.ts.map