Docs
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference
Debouncer API Reference

DebouncerState

Interface: DebouncerState<TFn>

Defined in: debouncer.ts:6

Type Parameters

TFn

TFn extends AnyFunction

Properties

canLeadingExecute

ts
canLeadingExecute: boolean;
canLeadingExecute: boolean;

Defined in: debouncer.ts:10

Whether the debouncer can execute on the leading edge of the timeout


executionCount

ts
executionCount: number;
executionCount: number;

Defined in: debouncer.ts:14

Number of function executions that have been completed


isPending

ts
isPending: boolean;
isPending: boolean;

Defined in: debouncer.ts:18

Whether the debouncer is waiting for the timeout to trigger execution


lastArgs

ts
lastArgs: Parameters<TFn> | undefined;
lastArgs: Parameters<TFn> | undefined;

Defined in: debouncer.ts:22

The arguments from the most recent call to maybeExecute


maybeExecuteCount

ts
maybeExecuteCount: number;
maybeExecuteCount: number;

Defined in: debouncer.ts:26

Number of times maybeExecute has been called (for reduction calculations)


status

ts
status: "disabled" | "idle" | "pending";
status: "disabled" | "idle" | "pending";

Defined in: debouncer.ts:30

Current execution status - 'idle' when not active, 'pending' when waiting for timeout