rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
72 lines (34 loc) • 886 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [promiseDelay](./rc-js-util.promisedelay.md)
## promiseDelay() function
Returns a `Promise` which will resolve to `resolveWith` after a delay of `delay` (in milliseconds).
**Signature:**
```typescript
export declare function promiseDelay<T>(resolveWith: T, delay?: number): Promise<T>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
resolveWith
</td><td>
T
</td><td>
</td></tr>
<tr><td>
delay
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
**Returns:**
Promise<T>
## Remarks
See [promiseDelay()](./rc-js-util.promisedelay.md)<!-- -->.