Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/async/every-by-right/docs/types/index.d"

Index

Type aliases

Binary

Binary: (error: Error | null, result: boolean) => void

Callback function.

param

encountered error or null

param

test result

Type declaration

    • (error: Error | null, result: boolean): void
    • Parameters

      • error: Error | null
      • result: boolean

      Returns void

BinaryPredicate

BinaryPredicate: (value: any, next: Callback) => void

Checks whether an element in a collection passes a test.

param

collection value

param

callback which should be called once the predicate function has finished processing a collection value

Type declaration

    • Parameters

      Returns void

Callback

Callback: Nullary | Unary | Binary

Callback function.

param

encountered error or null

param

test result

FactoryFunction

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

Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.

param

input collection

param

function to invoke upon completion

Type declaration

Nullary

Nullary: () => void

Callback function.

Type declaration

    • (): void
    • Returns void

Predicate

Checks whether an element in a collection passes a test.

param

collection value

param

collection index

param

input collection

param

callback which should be called once the predicate function has finished processing a collection value

QuaternaryPredicate

QuaternaryPredicate: (value: any, index: number, collection: Collection, next: Callback) => void

Checks whether an element in a collection passes a test.

param

collection value

param

collection index

param

input collection

param

callback which should be called once the predicate function has finished processing a collection value

Type declaration

TernaryPredicate

TernaryPredicate: (value: any, index: number, next: Callback) => void

Checks whether an element in a collection passes a test.

param

collection value

param

collection index

param

callback which should be called once the predicate function has finished processing a collection value

Type declaration

    • (value: any, index: number, next: Callback): void
    • Parameters

      • value: any
      • index: number
      • next: Callback

      Returns void

Unary

Unary: (error: Error | null) => void

Callback function.

param

encountered error or null

Type declaration

    • (error: Error | null): void
    • Parameters

      • error: Error | null

      Returns void

Variables

Export assignment everyByRightAsync

everyByRightAsync: EveryByRightAsync

Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.

Notes

  • If a predicate 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

predicate function to invoke for each element in a collection

param

function to invoke upon completion

throws

must provide valid options