Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/async/for-each-right/docs/types/index.d"

Index

Type aliases

BinaryFcn

BinaryFcn<T, V>: (this: V, value: T, next: Next) => void

Function invoked for each element in a collection.

param

collection value

param

a callback to be invoked after processing a collection value

Type parameters

  • T

  • V

Type declaration

    • (this: V, value: T, next: Next): void
    • Parameters

      • this: V
      • value: T
      • next: Next

      Returns void

Callback

Callback: Nullary | Unary

Callback function.

param

encountered error

FactoryFunction

FactoryFunction: (collection: Collection, done: Callback) => void

Function which invokes the provided function once for each element in a collection.

param

input collection

param

function to invoke upon completion

Type declaration

Fcn

Fcn<T, V>: BinaryFcn<T, V> | TernaryFcn<T, V> | QuaternaryFcn<T, V>

Function invoked for each element in a collection.

param

collection value

param

collection index

param

input collection

param

a callback to be invoked after processing a collection value

Type parameters

  • T

  • V

Next

Next: Nullary | Unary

Callback function to invoke once the provided function has finished processing a collection value.

param

encountered error

Nullary

Nullary: () => void

Callback function.

Type declaration

    • (): void
    • Returns void

QuaternaryFcn

QuaternaryFcn<T, V>: (this: V, value: T, index: number, collection: Collection<T>, next: Next) => void

Function invoked for each element in a collection.

param

collection value

param

collection index

param

input collection

param

a callback to be invoked after processing a collection value

Type parameters

  • T

  • V

Type declaration

    • (this: V, value: T, index: number, collection: Collection<T>, next: Next): void
    • Parameters

      Returns void

TernaryFcn

TernaryFcn<T, V>: (this: V, value: T, index: number, next: Next) => void

Function invoked for each element in a collection.

param

collection value

param

collection index

param

a callback to be invoked after processing a collection value

Type parameters

  • T

  • V

Type declaration

    • (this: V, value: T, index: number, next: Next): void
    • Parameters

      • this: V
      • value: T
      • index: number
      • next: Next

      Returns void

Unary

Unary: (error: Error) => void

Callback function.

param

encountered error

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

Variables

Export assignment forEachRightAsync

forEachRightAsync: ForEachRightAsync

Invokes a function once for each element in a collection.

Notes

  • If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the done callback for subsequent error handling.
  • This function does not guarantee that execution is asynchronous. To do so, wrap the done callback in a function which either executes at the end of the current stack (e.g., nextTick) or during a subsequent turn of the event loop (e.g., setImmediate, setTimeout).
param

input collection

param

function options

param

execution context

param

maximum number of pending invocations at any one time

param

boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false)

param

function to invoke for each element in a collection

param

function to invoke upon completion

throws

must provide valid options