@uploadcare/upload-client
    Preparing search index...

    Class Queue

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Add a task to the queue

      If you want to add a lot of tasks at once, consider setting autoRun to false and calling run() manually after adding all tasks to avoid multiple redundant calls to run().

      Type Parameters

      • T

      Parameters

      • task: Task<T>

        The task to add

      • autoRun: { autoRun?: boolean } = ...

        Whether to automatically run the queue after adding the task (default: true)

      Returns Promise<T>

      A promise that resolves or rejects with the task's result