Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Throttle<T>

Type parameters

  • T = void

Hierarchy

  • Throttle

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Throttle(rate?: undefined | number): Throttle

Properties

Private __currentPromise

__currentPromise: Promise<T> | null = null

Private __lastTime

__lastTime: number = 0

Private __latest

__latest: (() => T) | null = null

rate

rate: number

Rate, in ms.

Methods

do

  • do(func: () => T): Promise<T>

Generated using TypeDoc