Skip to content

utils.Utils.Function.waitWithTimeout

Christian d'Heureuse edited this page Nov 16, 2026 · 1 revision

tedious-plus / utils/Utils / waitWithTimeout

Function: waitWithTimeout()

function waitWithTimeout(promise, ms): Promise<boolean>;

Defined in: utils/Utils.ts:44

Waits until a promise is settled, but at most for the specified time.

Parameters

promise

Promise<unknown>

The promise to wait for. Its result value or rejection reason is ignored.

ms

number

The maximum time to wait, in milliseconds.

Returns

Promise<boolean>

true if the promise has been settled, false if the timeout has elapsed.

Clone this wiki locally