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

ThrottlerState

Interface: ThrottlerState<TFn>

Defined in: throttler.ts:6

Type Parameters

TFn extends AnyFunction

Properties

executionCount

executionCount: number;
executionCount: number;

Defined in: throttler.ts:10

Number of function executions that have been completed


isPending

isPending: boolean;
isPending: boolean;

Defined in: throttler.ts:14

Whether the throttler is waiting for the timeout to trigger execution


lastArgs

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

Defined in: throttler.ts:18

The arguments from the most recent call to maybeExecute


lastExecutionTime

lastExecutionTime: number;
lastExecutionTime: number;

Defined in: throttler.ts:22

Timestamp of the last function execution in milliseconds


maybeExecuteCount

maybeExecuteCount: number;
maybeExecuteCount: number;

Defined in: throttler.ts:26

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


nextExecutionTime

nextExecutionTime: undefined | number;
nextExecutionTime: undefined | number;

Defined in: throttler.ts:30

Timestamp when the next execution can occur in milliseconds


status

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

Defined in: throttler.ts:34

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

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.