Runs given callback async.
a function to execute async
the delay in msec
the arguments pushed to the callback during execution.
the execution promise
import async from "apprt-core/async";// a sum functionconst sum = (x: number, y: number) => x + y;// execute 3 + 4, 200msec laterconst result = await async(sum, 200, 3, 4);// result === 7assert.equal(result, 7); Copy
import async from "apprt-core/async";// a sum functionconst sum = (x: number, y: number) => x + y;// execute 3 + 4, 200msec laterconst result = await async(sum, 200, 3, 4);// result === 7assert.equal(result, 7);
Same as the first overload, but without a delay.
Runs given callback async.