createAsyncCallbackLoop
function createAsyncCallbackLoop<P, R>(
callback,
frameRate,
__namedParameters): object;
Create an async callback loop to be called recursively with delay based on
the frameRate
Type Parameters
| Type Parameter |
|---|
P extends unknown[] |
R extends Promise<unknown> |
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<R, P> | The callback to be invoked |
frameRate | number | The rate to be expected to invoke the callback |
__namedParameters | Partial<AsyncCallbackLoopOptions> | - |
Returns
object
| Name | Type |
|---|---|
start() | (...params) => Promise<void> |
stop() | () => void |
get frameRate | number |
set frameRate | void |