Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference
Debouncer API Reference

injectDebouncedValue

Call Signature

ts
function injectDebouncedValue<TValue>(signalToDebounce, options): AngularDebouncerValue<TValue>;
function injectDebouncedValue<TValue>(signalToDebounce, options): AngularDebouncerValue<TValue>;

Defined in: packages/angular-pacer/src/debouncer/injectDebouncedValue.ts:50

Creates an Angular debounced view of a source signal.

The initial source value is available on first read. Source changes are observed by an effect and applied after the debounce delay; newer changes restart the delay.

The returned value is a real Angular signal with the underlying utility exposed on debouncer. Options accept a static object or reactive factory and follow injectDebouncer lifecycle and provider behavior.

Type Parameters

TValue

TValue

Parameters

signalToDebounce

() => TValue

The source signal or accessor whose changes are observed.

options

MaybeAccessor<AngularDebouncerOptions<(value) => void>>

Core options or a reactive options factory.

Returns

AngularDebouncerValue<TValue>

The value signal with a debouncer attribute.

Example

ts
// In a component or service injection context.
const source = signal('initial')
const value = injectDebouncedValue(source, { wait: 250 })
source.set('updated')
console.log(value())
// In a component or service injection context.
const source = signal('initial')
const value = injectDebouncedValue(source, { wait: 250 })
source.set('updated')
console.log(value())

Call Signature

ts
function injectDebouncedValue<TValue, TSelected>(
   signalToDebounce,
   options,
selector): AngularDebouncerValue<TValue, TSelected>;
function injectDebouncedValue<TValue, TSelected>(
   signalToDebounce,
   options,
selector): AngularDebouncerValue<TValue, TSelected>;

Defined in: packages/angular-pacer/src/debouncer/injectDebouncedValue.ts:58

Creates the value signal with selected state on its attached utility ref.

Type Parameters

TValue

TValue

TSelected

TSelected

Parameters

signalToDebounce

() => TValue

options

MaybeAccessor<AngularDebouncerOptions<(value) => void>>

selector

(state) => TSelected

Selects reactive state exposed on the attached utility ref.

Returns

AngularDebouncerValue<TValue, TSelected>