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

AsyncThrottlerState

Interface: AsyncThrottlerState<TFn>

Defined in: async-throttler.ts:5

Type Parameters

TFn extends AnyAsyncFunction

Properties

errorCount

ts
errorCount: number;
errorCount: number;

Defined in: async-throttler.ts:9

Number of function executions that have resulted in errors


isExecuting

ts
isExecuting: boolean;
isExecuting: boolean;

Defined in: async-throttler.ts:13

Whether the throttled function is currently executing asynchronously


isPending

ts
isPending: boolean;
isPending: boolean;

Defined in: async-throttler.ts:17

Whether the throttler is waiting for the timeout to trigger execution


lastArgs

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

Defined in: async-throttler.ts:21

The arguments from the most recent call to maybeExecute


lastExecutionTime

ts
lastExecutionTime: number;
lastExecutionTime: number;

Defined in: async-throttler.ts:25

Timestamp of the last function execution in milliseconds


lastResult

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

Defined in: async-throttler.ts:29

The result from the most recent successful function execution


nextExecutionTime

ts
nextExecutionTime: number;
nextExecutionTime: number;

Defined in: async-throttler.ts:33

Timestamp when the next execution can occur in milliseconds


settleCount

ts
settleCount: number;
settleCount: number;

Defined in: async-throttler.ts:37

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


status

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

Defined in: async-throttler.ts:41

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


successCount

ts
successCount: number;
successCount: number;

Defined in: async-throttler.ts:45

Number of function executions that have completed successfully

Our Partners
Unkey
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.