Interface ThrottledFunctionStats

Statistics for a ThrottledFunction

Hierarchy

  • ThrottledFunctionStats

Properties

cooldownMs: number

The current cooldown period, in milliseconds

executions: number

The number of times the underlying function has actually executed

invocations: number

The number of times the throttled function has been called

isCoolingDown: boolean

Whether or not the ThrottledFunction is in a cooldown period

lastExecuted: undefined | Date

The time the underlying function was last executed

lastInvoked: undefined | Date

The time the throttled function was last called

queuedInvocation: boolean

Whether or not an invocation is currently queued for when the cooldown period ends.

reset: (() => void)

Type declaration

    • (): void
    • Resets all stats for the throttled function. Does not alter the behavior of the throttled function outside future calls to getStats().

      Returns

      Returns void

Generated using TypeDoc