1
0
Fork 0
js-utils/docs/api/js-utils.timeout.md

591 B

Home > @apextoaster/js-utils > timeout

timeout() function

Reject after a set amount of time if the original promise has not yet resolved.

Signature:

export declare function timeout<T>(ms: number, inner: Promise<T>): Promise<T>;

Parameters

Parameter Type Description
ms number
inner Promise<T>

Returns:

Promise<T>