tryError Documentation

Class: AsyncQueue\<T\>
Class

Defined in: [async.ts:698](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/async.ts#L698) Queue for managing async operations

tryError API Documentation v0.0.1-alpha.1


tryError API Documentation / AsyncQueue

Class: AsyncQueue<T>

Defined in: async.ts:698

Queue for managing async operations

Type Parameters

T

T

Constructors

Constructor

new AsyncQueue<T>(options): AsyncQueue<T>;

Defined in: async.ts:706

Parameters

options
concurrency?

number

onError?

(error) => void

Returns

AsyncQueue<T>

Methods

add()

add(fn): Promise<TryResult<T, TryError<string>>>;

Defined in: async.ts:716

Add an operation to the queue

Parameters

fn

() => Promise<T>

Returns

Promise<TryResult<T, TryError<string>>>


clear()

clear(): void;

Defined in: async.ts:765

Clear the queue

Returns

void


getSize()

getSize(): number;

Defined in: async.ts:758

Get current queue size

Returns

number