Defined in: async-throttler.ts:8
Type Parameters#
TFn#
TFn extends AnyAsyncFunction
Properties#
errorCount#
errorCount: number;
Defined in: async-throttler.ts:12
Number of function executions that have resulted in errors
isExecuting#
isExecuting: boolean;
Defined in: async-throttler.ts:16
Whether the throttled function is currently executing asynchronously
isPending#
isPending: boolean;
Defined in: async-throttler.ts:20
Whether the throttler is waiting for the timeout to trigger execution
lastArgs#
lastArgs: Parameters<TFn> | undefined;
Defined in: async-throttler.ts:24
The arguments from the most recent call to maybeExecute
lastExecutionTime#
lastExecutionTime: number;
Defined in: async-throttler.ts:28
Timestamp of the last function execution in milliseconds
lastResult#
lastResult: Awaited<ReturnType<TFn>> | undefined;
Defined in: async-throttler.ts:32
The result from the most recent successful function execution
maybeExecuteCount#
maybeExecuteCount: number;
Defined in: async-throttler.ts:36
Number of times maybeExecute has been called (for reduction calculations)
nextExecutionTime#
nextExecutionTime: number | undefined;
Defined in: async-throttler.ts:40
Timestamp when the next execution can occur in milliseconds
settleCount#
settleCount: number;
Defined in: async-throttler.ts:44
Number of function executions that have completed (either successfully or with errors)
status#
status: "disabled" | "idle" | "executing" | "pending" | "settled";
Defined in: async-throttler.ts:48
Current execution status - 'idle' when not active, 'pending' when waiting, 'executing' when running, 'settled' when completed
successCount#
successCount: number;
Defined in: async-throttler.ts:52
Number of function executions that have completed successfully