Wraps a callback into a task object which can be used to control the async execution of it.
import AsyncTask from "apprt-core/AsyncTask";const task = AsyncTask(x => x * 200);const r = await task.run(2);assert.strictEqual(r, 400); Copy
import AsyncTask from "apprt-core/AsyncTask";const task = AsyncTask(x => x * 200);const r = await task.run(2);assert.strictEqual(r, 400);
Creates an async task without a callback.
Wraps a callback into a task object which can be used to control the async execution of it.