Defined in: async-queuer.ts:3
• TValue
optional addItemsTo: QueuePosition;
optional addItemsTo: QueuePosition;
Defined in: async-queuer.ts:8
Default position to add items to the queuer
'back'
'back'
optional concurrency: number;
optional concurrency: number;
Defined in: async-queuer.ts:12
Maximum number of concurrent tasks to process
optional getItemsFrom: QueuePosition;
optional getItemsFrom: QueuePosition;
Defined in: async-queuer.ts:17
Default position to get items from during processing
'front'
'front'
optional getPriority: (item) => number;
optional getPriority: (item) => number;
Defined in: async-queuer.ts:23
Function to determine priority of items in the queuer Higher priority items will be processed first If not provided, will use static priority values attached to tasks
() => Promise<TValue>
number
optional initialItems: () => Promise<TValue> & object[];
optional initialItems: () => Promise<TValue> & object[];
Defined in: async-queuer.ts:27
Initial items to populate the queuer with
optional maxSize: number;
optional maxSize: number;
Defined in: async-queuer.ts:31
Maximum number of items allowed in the queuer
optional onGetNextItem: (item, queuer) => void;
optional onGetNextItem: (item, queuer) => void;
Defined in: async-queuer.ts:35
Callback fired whenever an item is removed from the queuer
() => Promise<TValue>
AsyncQueuer<TValue>
void
optional onUpdate: (queuer) => void;
optional onUpdate: (queuer) => void;
Defined in: async-queuer.ts:42
Callback fired whenever an item is added or removed from the queuer
AsyncQueuer<TValue>
void
optional started: boolean;
optional started: boolean;
Defined in: async-queuer.ts:46
Whether the queuer should start processing tasks immediately
optional wait: number;
optional wait: number;
Defined in: async-queuer.ts:50
Time in milliseconds to wait between processing items
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.