WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

A d3-queue queue object as returned by queue(...)

Hierarchy

  • Queue

Index

Methods

abort

  • abort()
  • Aborts any active tasks, invoking each active task’s task.abort function, if any. Also prevents any new tasks from starting, and immediately invokes the queue.await or queue.awaitAll callback with an error indicating that the queue was aborted.

await

  • await(callback: function)
  • Sets the callback to be invoked when all deferred tasks have finished (individual result arguments).

    Parameters

    • callback: function

      Callback function to be executed, when error occured or all deferred tasks have completed. The first argument to the callback is the first error that occurred, or null if no error occurred. If an error occurred, there are no additional arguments to the callback. Otherwise, the callback is passed each result as an additional argument.

        • (error: any | null, ...results: Array<any>): void
        • Parameters

          • error: any | null
          • Rest ...results: Array<any>

          Returns void

awaitAll

  • awaitAll(callback: function)
  • Sets the callback to be invoked when all deferred tasks have finished (results array).

    Parameters

    • callback: function

      Callback function to be executed, when error occured or all deferred tasks have completed. The first argument to the callback is the first error that occurred, or null if no error occurred. If an error occurred, there are no additional arguments to the callback. Otherwise, the callback is also passed an array of results as the second argument.

        • (error: any | null, results?: Array<any>): void
        • Parameters

          • error: any | null
          • Optional results: Array<any>

          Returns void

defer

  • defer(task: function, ...args: any[])
  • Adds the specified asynchronous task callback to the queue, with any optional arguments.

    Parameters

    • task: function

      Task to be executed.The task is a function that will be called when the task should start. It is passed the specified optional arguments and an additional callback as the last argument; the callback must be invoked by the task when it finishes. The task must invoke the callback with two arguments: the error, if any, and the result of the task. To return multiple results from a single callback, wrap the results in an object or array.

        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    • Rest ...args: any[]

      Additional, optional arguments to be passed into deferred task on invocation

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc