function injectQueuer<TValue>(fn, options?): AngularQueuer<TValue>;Defined in: packages/angular-pacer/src/queuer/injectQueuer.ts:102
Creates and manages an Angular Queuer in the current injection context.
Processes queued items in order with configurable pacing, capacity, and priority.
Accepts static options or an options factory. Factories are read lazily, and signal dependencies update the existing core instance. Local options override provider defaults. Methods apply current options before executing and schedule work outside Angular's zone. The provided function runs inside Angular's zone.
Pass a selector to expose reactive core state through state(). Without a selector, state() returns {}; operations remain available on the ref.
The default cleanup is to stop automatic processing. Set onUnmount to replace it.
TValue
(item) => void
The callback invoked by the core utility.
MaybeAccessor<AngularQueuerOptions<TValue>>
Core options or a reactive factory returning them.
AngularQueuer<TValue>
A ref containing stable methods and a readonly selected-state signal.
// In a component or service injection context.
const utility = injectQueuer(
(item: string) => console.log(item),
() => ({ wait: 100 }),
(state) => state.items,
)
utility.addItem('job')
console.log(utility.state())function injectQueuer<TValue, TSelected>(
fn,
options,
selector): AngularQueuer<TValue, TSelected>;Defined in: packages/angular-pacer/src/queuer/injectQueuer.ts:113
Creates an Angular Queuer with a reactive selector result.
TValue
TSelected
(item) => void
The callback invoked by the core utility.
MaybeAccessor<AngularQueuerOptions<TValue>>
Core options or a reactive options factory.
(state) => TSelected
Selects the state exposed by the returned state signal.
AngularQueuer<TValue, TSelected>
The utility ref with the selected state.