Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Throttler

Hierarchy

  • Throttler

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Throttler(count: number, duration: number): Throttler
  • Parameters

    • count: number

      How many time the throttler can be triggered.

    • duration: number

      Time in seconds since the first trigger before the throttler is reset.

    Returns Throttler

Properties

Readonly count

count: number

How many time the throttler can be triggered.

Readonly duration

duration: number

Time in seconds since the first trigger before the throttler is reset.

Accessors

cooldown

  • get cooldown(): number

current

  • get current(): number

throttled

  • get throttled(): boolean

Methods

add

  • add(): boolean

reset

  • reset(): void

Generated using TypeDoc