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:5

Type Parameters

TFn extends AnyFunction

Properties

executionCount

ts
executionCount: number;
executionCount: number;

Defined in: throttler.ts:9

Number of function executions that have been completed


isPending

ts
isPending: boolean;
isPending: boolean;

Defined in: throttler.ts:13

Whether the throttler is waiting for the timeout to trigger execution


lastArgs

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

Defined in: throttler.ts:17

The arguments from the most recent call to maybeExecute


lastExecutionTime

ts
lastExecutionTime: number;
lastExecutionTime: number;

Defined in: throttler.ts:21

Timestamp of the last function execution in milliseconds


nextExecutionTime

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

Defined in: throttler.ts:25

Timestamp when the next execution can occur in milliseconds


status

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

Defined in: throttler.ts:29

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