Skip to content

Queue

Defined in: utils/promise/Queue.ts:16

A class representing a queue of promises.

Type Parameters

T = any | void

The type of the values that the promises in the queue resolve to.

Constructors

new Queue()

new Queue<T>(promises): Queue<T>

Defined in: utils/promise/Queue.ts:26

Creates a new Queue.

Parameters

promises

(Promise<any> | () => Promise<T>)[] = []

The promises to add to the queue.

Returns

Queue<T>

Accessors

results

Get Signature

get results(): T[]

Defined in: utils/promise/Queue.ts:36

Gets the results of the promises that have been resolved so far.

Returns

T[]

The results.

Methods

add()

add(…args): void

Defined in: utils/promise/Queue.ts:44

Adds promises to the queue.

Parameters

args

…(Promise<any> | () => Promise<T>)[]

The promises to add.

Returns

void


cancel()

cancel(): void

Defined in: utils/promise/Queue.ts:79

Cancels the execution of the promises in the queue.

Returns

void


pause()

pause(): void

Defined in: utils/promise/Queue.ts:62

Pauses the execution of the promises in the queue.

Returns

void


resume()

resume(): void

Defined in: utils/promise/Queue.ts:69

Resumes the execution of the promises in the queue.

Returns

void


start()

start(): void

Defined in: utils/promise/Queue.ts:51

Starts the execution of the promises in the queue.

Returns

void