31 lines
675 B
Markdown
31 lines
675 B
Markdown
|
<!-- 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
|
||
|
|
||
|
Reject after a set number of attempts if the given predicate does not return true.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare function deferUntil(cb: PredicateC0, step: number, tries: number): Promise<void>;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| cb | PredicateC0 | |
|
||
|
| step | number | |
|
||
|
| tries | number | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
Promise<void>
|
||
|
|
||
|
## Exceptions
|
||
|
|
||
|
TimeoutError
|
||
|
|