2021-08-08 00:34:19 +00:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [deferUntil](./js-utils.deferuntil.md)
|
|
|
|
|
|
|
|
## deferUntil() function
|
|
|
|
|
2021-08-08 19:58:43 +00:00
|
|
|
Resolve if `cb` returns true within `max` tries, otherwise reject with a `TimeoutError`<!-- -->.
|
2021-08-08 00:34:19 +00:00
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2021-08-08 19:58:43 +00:00
|
|
|
export declare function deferUntil(cb: PredicateC0, step: number, max: number): Promise<void>;
|
2021-08-08 00:34:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| cb | PredicateC0 | |
|
|
|
|
| step | number | |
|
2021-08-08 19:58:43 +00:00
|
|
|
| max | number | |
|
2021-08-08 00:34:19 +00:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
Promise<void>
|
|
|
|
|
|
|
|
## Exceptions
|
|
|
|
|
|
|
|
TimeoutError
|
|
|
|
|