649 B
649 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, oper: Promise<T>): Promise<Optional<T>>;
Parameters
Parameter | Type | Description |
---|---|---|
ms | number | |
oper | Promise<T> |
Returns:
Promise<Optional<T>>