DoOnce class
Task to perform only one time.
Methods
wait |
Wait for the task to be executed. |
Method Details
waitFor(string, () => Promise<T>)
Wait for the task to be executed.
function waitFor(key: string, fn: () => Promise<T>): Promise<T>
Parameters
- key
-
string
Key of the task.
- fn
-
() => Promise<T>
Function to perform.
Returns
Promise<T>
A promise representing the asynchronous operation.