/** * creates a queue with a consumer that consumes all items from it as soon as new items stop being added * * note * - produces one call to the consumer for all pushes to the queue that occurred within the delay period of eachother * * usecases * - waiting until all rapid activity stops to summarize the activity, before processing it * - for example: scroll events, mouse movements, typing, etc */ export declare const createQueueWithDebounceConsumer: ({ consumer, gap, }: { /** * the consumer to invoke with all of the events added to the queue queue, after debounce delay has expired */ consumer: ({ items }: { items: T[]; }) => void | Promise; /** * the gap in time to wait between new events before calling the consumer */ gap: { milliseconds: number; }; }) => import("../../domain.operations/queue/createQueue").Queue;