Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/map2/docs/types/index.d"

Index

Type aliases

ArrayCallback

ArrayCallback<T, U, V, W>: Nullary<V, W> | Unary<T, V, W> | Binary<T, U, V, W> | Ternary<T, U, V, W> | ArrayQuaternary<T, U, V, W>

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

param

element index

param

first input array

param

second input array

returns

result

Type parameters

  • T

  • U

  • V

  • W

ArrayQuaternary

ArrayQuaternary<T, U, V, W>: (this: W, v1: T, v2: U, index: number, arrays: []) => V

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

param

element index

param

input arrays

returns

result

Type parameters

  • T

  • U

  • V

  • W

Type declaration

    • (this: W, v1: T, v2: U, index: number, arrays: []): V
    • Parameters

      • this: W
      • v1: T
      • v2: U
      • index: number
      • arrays: []

      Returns V

Binary

Binary<T, U, V, W>: (this: W, v1: T, v2: U) => V

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

returns

result

Type parameters

  • T

  • U

  • V

  • W

Type declaration

    • (this: W, v1: T, v2: U): V
    • Parameters

      • this: W
      • v1: T
      • v2: U

      Returns V

Callback

Callback<T, U, V, W>: Nullary<V, W> | Unary<T, V, W> | Binary<T, U, V, W> | Ternary<T, U, V, W> | Quaternary<T, U, V, W>

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

param

element index

param

first input array

param

second input array

returns

result

Type parameters

  • T

  • U

  • V

  • W

Nullary

Nullary<V, W>: (this: W) => V

Callback invoked for each pair of array elements.

returns

result

Type parameters

  • V

  • W

Type declaration

    • (this: W): V
    • Parameters

      • this: W

      Returns V

Quaternary

Quaternary<T, U, V, W>: (this: W, v1: T, v2: U, index: number, arrays: []) => V

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

param

element index

param

input arrays

returns

result

Type parameters

  • T

  • U

  • V

  • W

Type declaration

    • (this: W, v1: T, v2: U, index: number, arrays: []): V
    • Parameters

      • this: W
      • v1: T
      • v2: U
      • index: number
      • arrays: []

      Returns V

Ternary

Ternary<T, U, V, W>: (this: W, v1: T, v2: U, index: number) => V

Callback invoked for each pair of array elements.

param

element from the first input array

param

element from the second input array

param

element index

returns

result

Type parameters

  • T

  • U

  • V

  • W

Type declaration

    • (this: W, v1: T, v2: U, index: number): V
    • Parameters

      • this: W
      • v1: T
      • v2: U
      • index: number

      Returns V

Unary

Unary<T, V, W>: (this: W, v1: T) => V

Callback invoked for each pair of array elements.

param

element from the first input array

returns

result

Type parameters

  • T

  • V

  • W

Type declaration

    • (this: W, v1: T): V
    • Parameters

      • this: W
      • v1: T

      Returns V

Variables

map2

map2: Routine

Applies a function to elements in two input arrays and assigns the results to a new array.

Notes

  • The applied function is provided the following arguments:

    • v1: element from first input array.
    • v2: element from second input array.
    • idx: element index.
    • arrays: input arrays.
param

first input array

param

second input array

param

function to apply

param

input function context

returns

output array