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

26 lines
589 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [timeout](./js-utils.timeout.md)
## timeout() function
Reject after a set amount of time if the original promise has not yet resolved.
<b>Signature:</b>
```typescript
export declare function timeout<T>(ms: number, oper: Promise<T>): Promise<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| ms | number | |
| oper | Promise&lt;T&gt; | |
<b>Returns:</b>
Promise&lt;T&gt;