Skip to content

Queue

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

A class representing a queue of promises.

T = any | void

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

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

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

Creates a new Queue.

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

The promises to add to the queue.

Queue<T>

get progress(): number

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

Gets the progress of the queue.

number

The progress (0-1)


get results(): T[]

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

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

T[]

The results.

add(…args): void

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

Adds promises to the queue.

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

The promises to add.

void


cancel(): void

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

Cancels the execution of the promises in the queue.

void


pause(): void

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

Pauses the execution of the promises in the queue.

void


resume(): void

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

Resumes the execution of the promises in the queue.

void


start(): void

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

Starts the execution of the promises in the queue.

void