Wraps a callback into a task object which can be used to control the async execution of it.
Rest
import AsyncTask from "apprt-core/AsyncTask";let task = AsyncTask(x => x * 200);task.run(2).then((r)=> { console.log(r); //-> 400}); Copy
import AsyncTask from "apprt-core/AsyncTask";let task = AsyncTask(x => x * 200);task.run(2).then((r)=> { console.log(r); //-> 400});
Creates an async task without a callback.
Generated using TypeDoc
Wraps a callback into a task object which can be used to control the async execution of it.