Documentation
Framework
Version
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference

AsyncDebouncerState

Interface: AsyncDebouncerState<TFn>

Defined in: async-debouncer.ts:6

Type Parameters

TFn extends AnyAsyncFunction

Properties

canLeadingExecute

canLeadingExecute: boolean;
canLeadingExecute: boolean;

Defined in: async-debouncer.ts:10

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


errorCount

errorCount: number;
errorCount: number;

Defined in: async-debouncer.ts:14

Number of function executions that have resulted in errors


isExecuting

isExecuting: boolean;
isExecuting: boolean;

Defined in: async-debouncer.ts:18

Whether the debounced function is currently executing asynchronously


isPending

isPending: boolean;
isPending: boolean;

Defined in: async-debouncer.ts:22

Whether the debouncer is waiting for the timeout to trigger execution


lastArgs

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

Defined in: async-debouncer.ts:26

The arguments from the most recent call to maybeExecute


lastResult

lastResult: undefined | ReturnType<TFn>;
lastResult: undefined | ReturnType<TFn>;

Defined in: async-debouncer.ts:30

The result from the most recent successful function execution


maybeExecuteCount

maybeExecuteCount: number;
maybeExecuteCount: number;

Defined in: async-debouncer.ts:34

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


settleCount

settleCount: number;
settleCount: number;

Defined in: async-debouncer.ts:38

Number of function executions that have completed (either successfully or with errors)


status

status: "disabled" | "idle" | "pending" | "executing" | "settled";
status: "disabled" | "idle" | "pending" | "executing" | "settled";

Defined in: async-debouncer.ts:42

Current execution status - 'idle' when not active, 'pending' when waiting, 'executing' when running, 'settled' when completed


successCount

successCount: number;
successCount: number;

Defined in: async-debouncer.ts:46

Number of function executions that have completed successfully

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.