Class TimedQueue<T>

Queue that is flushed automatically when it reaches some item limit or when timeout is reached.

Type Parameters

  • T

Constructors

Properties

Methods

Constructors

Properties

itemLimit: number = 100

Queue will be flushed when it reaches this number of items.

list: T[] = []
timeLimit: number = 5_000

Queue will be flushed after this many milliseconds.

timer: any = null

Methods