@nevware21/ts-async - v0.5.4
    Preparing search index...

    Type Alias StartQueuedTaskFn<T>

    StartQueuedTaskFn: (taskName?: string) => T | IPromise<T>

    Identifies the function to call to start and execute the task when its ready to be executed.

    Type Parameters

    • T

    Type declaration

      • (taskName?: string): T | IPromise<T>
      • Parameters

        • OptionaltaskName: string

          The optional task name that was assigned to this task, it is passed by the task scheduler.

        Returns T | IPromise<T>

        The result or a IPromise that will be resolved / rejected when the task was completed.

    0.2.0

    function taskFunc1() {
    return 42;
    }

    function taskFunc2(taskName: string) {
    console.log("Running Task: " + taskName);
    return fetch("https://example.com/xxxx").then((response) => {
    // ...
    });
    }

    function taskFunc3() {
    return Promise.all([...]);
    }

    function taskFunc4() {
    return createAllPromise([...]);
    }

    function taskFunc5(taskName: string) {
    return createPromise(() => {
    scheduleTimeout(() => {
    console.log("Completing task: " + taskName);
    resolve(true);
    }, 100);
    });
    }