Skip to content

@lelantos-org/sdk / core / withTimeout

Function: withTimeout() โ€‹

ts
function withTimeout<T>(
   p, 
   ms, 
   mkError, 
   signal?
): Promise<T>;

Defined in: @lelantos-org/sdk/dist/core/async.d.ts:13

Reject with mkError() if p has not settled within ms. The timer is always cleared, so a fast success leaves nothing pending.

Type Parameters โ€‹

Type Parameter
T

Parameters โ€‹

ParameterType
pPromise<T>
msnumber
mkError() => Error
signal?AbortSignal

Returns โ€‹

Promise<T>

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub