File: QueuerOptions.md | Updated: 11/15/2025
Search...
+ K
Auto
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide
Documentation
Framework
React
Version
Latest
Search...
+ K
Menu
Getting Started
Guides
API Reference
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference
Debouncer Examples
Throttler Examples
Rate Limiter Examples
Queue Examples
Batcher Examples
TanStack Query Examples
Framework
React
Version
Latest
Menu
Getting Started
Guides
API Reference
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference
Debouncer Examples
Throttler Examples
Rate Limiter Examples
Queue Examples
Batcher Examples
TanStack Query Examples
On this page
Copy Markdown
Interface: QueuerOptions<TValue>
================================
Defined in: queuer.ts:83
Options for configuring a Queuer instance.
These options control queue behavior, item expiration, callbacks, and more.
Type Parameters
---------------
### TValue
TValue
Properties
----------
### addItemsTo?
ts
optional addItemsTo: QueuePosition;
optional addItemsTo: QueuePosition;
Defined in: queuer.ts:88
Default position to add items to the queuer
ts
'back'
'back'
ts
optional expirationDuration: number;
optional expirationDuration: number;
Defined in: queuer.ts:93
Maximum time in milliseconds that an item can stay in the queue If not provided, items will never expire
ts
optional getIsExpired: (item, addedAt) => boolean;
optional getIsExpired: (item, addedAt) => boolean;
Defined in: queuer.ts:98
Function to determine if an item has expired If provided, this overrides the expirationDuration behavior
TValue
number
boolean
ts
optional getItemsFrom: QueuePosition;
optional getItemsFrom: QueuePosition;
Defined in: queuer.ts:103
Default position to get items from during processing
ts
'front'
'front'
ts
optional getPriority: (item) => number;
optional getPriority: (item) => number;
Defined in: queuer.ts:108
Function to determine priority of items in the queuer Higher priority items will be processed first
TValue
number
ts
optional initialItems: TValue[];
optional initialItems: TValue[];
Defined in: queuer.ts:112
Initial items to populate the queuer with
ts
optional initialState: Partial<QueuerState<TValue>>;
optional initialState: Partial<QueuerState<TValue>>;
Defined in: queuer.ts:116
Initial state for the queuer
ts
optional key: string;
optional key: string;
Defined in: queuer.ts:121
Optional key to identify this queuer instance. If provided, the queuer will be identified by this key in the devtools and PacerProvider if applicable.
ts
optional maxSize: number;
optional maxSize: number;
Defined in: queuer.ts:125
Maximum number of items allowed in the queuer
ts
optional onExecute: (item, queuer) => void;
optional onExecute: (item, queuer) => void;
Defined in: queuer.ts:129
Callback fired whenever an item is removed from the queuer
TValue
Queuer <TValue>
void
ts
optional onExpire: (item, queuer) => void;
optional onExpire: (item, queuer) => void;
Defined in: queuer.ts:133
Callback fired whenever an item expires in the queuer
TValue
Queuer <TValue>
void
ts
optional onItemsChange: (queuer) => void;
optional onItemsChange: (queuer) => void;
Defined in: queuer.ts:137
Callback fired whenever an item is added or removed from the queuer
Queuer <TValue>
void
ts
optional onReject: (item, queuer) => void;
optional onReject: (item, queuer) => void;
Defined in: queuer.ts:141
Callback fired whenever an item is rejected from being added to the queuer
TValue
Queuer <TValue>
void
ts
optional started: boolean;
optional started: boolean;
Defined in: queuer.ts:145
Whether the queuer should start processing tasks immediately
ts
optional wait: number | (queuer) => number;
optional wait: number | (queuer) => number;
Defined in: queuer.ts:151
Time in milliseconds to wait between processing items. Can be a number or a function that returns a number.
ts
0
0
