UNPKG

@shopify/cli-kit

Version:

A set of utilities, interfaces, and models that are common across all the platform features

15 lines (14 loc) 471 B
/** * Handles serial processing of items with automatic batching * Only one processing operation runs at a time, with new items * automatically queued for the next batch. */ export declare class SerialBatchProcessor<T> { private readonly processBatch; private queue; private processingPromise; constructor(processBatch: (items: T[]) => Promise<void>); enqueue(item: T): void; waitForCompletion(): Promise<void>; private startProcessing; }