• Wraps a callback into a task object which can be used to control the async execution of it.

    Type Parameters

    • Args extends any[]
    • Result

    Parameters

    Returns Task<Args, Result>

    Example

    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.

    Returns Task<[], void>

Generated using TypeDoc