Function any

  • Execute all tasks in parallel and return the result of the first successful one

    Resulting task resolves when the first tasks is successfuly resolved, returning it's result In case of external task rejecttion all tasks are rejected with that error and resulting task is rejected with an array of errors In case of internal task rejection the execution is continued untill fthe first task resolves succesfully or all the tasks are rejected this way resulting task is rejected with an array of errors In case of cancelation resulting task is immediately immediately canceled together with all pending tasks

    Type Parameters

    • T

      underlying task type

    Parameters

    • tasks: Iterable<Task<T>>

      iterable of tasks to execute

    Returns Task<T>

    Note

    direct equivalent of Promise.any

    Retuirns

    task resolving to the result of first successfull task

Generated using TypeDoc