API ReferenceGlobalsPromiseQueue

# Class: PromiseQueue <T>

# Type parameters

T

# Hierarchy

  • PromiseQueue

# Index

# Constructors

# Accessors

# Methods

# Constructors

# constructor

+ new PromiseQueue(callback?: function, errorCallback?: function): PromiseQueue

Defined in packages/common-core/src/utils/promise-queue.ts:24

Parameters:

Optional callback: function

▸ (results: T[]): void

Parameters:

Name Type
results T[]

Optional errorCallback: function

▸ (e: Error): void

Parameters:

Name Type
e Error

Returns: PromiseQueue

# Accessors

# length

get length(): number

Defined in packages/common-core/src/utils/promise-queue.ts:105

Returns: number

# Methods

# clear

clear(): void

Defined in packages/common-core/src/utils/promise-queue.ts:95

Returns: void


# finished

finished(ignoreErrors: boolean): Promise‹T[]›

Defined in packages/common-core/src/utils/promise-queue.ts:52

Wait for current queue to finish

Parameters:

Name Type Default
ignoreErrors boolean false

Returns: Promise‹T[]›


# push

push(promise: Promise‹T›): void

Defined in packages/common-core/src/utils/promise-queue.ts:36

Parameters:

Name Type
promise Promise‹T›

Returns: void


# registerCallback

registerCallback(callback: function): void

Defined in packages/common-core/src/utils/promise-queue.ts:77

Callback whenever queue is finished

Parameters:

callback: function

▸ (results: T[]): void

Parameters:

Name Type
results T[]

Returns: void


# unregisterCallback

unregisterCallback(): void

Defined in packages/common-core/src/utils/promise-queue.ts:81

Returns: void