26 lines
546 B
Markdown
26 lines
546 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [defer](./js-utils.defer.md)
|
|
|
|
## defer() function
|
|
|
|
Resolve after a set amount of time.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
export declare function defer<T = undefined>(ms: number, val?: T): Promise<T>;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| ms | <code>number</code> | |
|
|
| val | <code>T</code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`Promise<T>`
|
|
|