Skip to content

pci-loader


Function: timedPromise()

timedPromise\<T>(promise, options?): Promise\<T>

Defined in: src/lib/timeout.ts:17

Manage a promise with a timeout. A race condition is created between the original promise and a timeout promise.

Type Parameters

T

T

Parameters

promise

Promise\<T>

The promise to manage.

options?

PromiseTimeoutOptions = {}

The timeout options.

Returns

Promise\<T>

A promise that either resolves or rejects based on the original promise or the timeout.