Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Accessors

Methods

Constructors

  • new default(interval?: number, maxCount?: number, count?: number, started?: number): default

Accessors

  • get elapsed(): number

Methods

  • reset(): void
  • shouldReset(): boolean
  • The rate limiter should reset if

    1. It has never started i.e. started is still undefined;
    2. It has been started more than the interval time ago;
    3. Something goes wrong while trying to calculate the elapsed time since the last reset.

    Returns boolean

    Whether or not this rate limiter should reset.

Generated using TypeDoc