Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Type aliases

ArrayCallback

ArrayCallback<T, U, V>: Nullary<U, V> | Unary<T, U, V> | Binary<T, U, V> | ArrayTernary<T, U, V>

Callback invoked for each array element.

param

array element

param

element index

param

array

returns

result

Type parameters

  • T

  • U

  • V

ArrayTernary

ArrayTernary<T, U, V>: (this: V, value: T, index: number, arr: Collection<T>) => U

Callback invoked for each array element.

param

array element

param

element index

param

array

returns

result

Type parameters

  • T

  • U

  • V

Type declaration

    • (this: V, value: T, index: number, arr: Collection<T>): U
    • Parameters

      • this: V
      • value: T
      • index: number
      • arr: Collection<T>

      Returns U

Binary

Binary<T, U, V>: (this: V, value: T, index: number) => U

Callback invoked for each array element.

param

array element

param

element index

returns

result

Type parameters

  • T

  • U

  • V

Type declaration

    • (this: V, value: T, index: number): U
    • Parameters

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

      Returns U

Callback

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

Callback invoked for each array element.

param

array element

param

element index

param

array

returns

result

Type parameters

  • T

  • U

  • V

Nullary

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

Callback invoked for each array element.

returns

result

Type parameters

  • U

  • V

Type declaration

    • (this: V): U
    • Parameters

      • this: V

      Returns U

Ternary

Ternary<T, U, V>: (this: V, value: T, index: number, arr: typedndarray<T>) => U

Callback invoked for each array element.

param

array element

param

element index

param

array

returns

result

Type parameters

  • T

  • U

  • V

Type declaration

    • (this: V, value: T, index: number, arr: typedndarray<T>): U
    • Parameters

      Returns U

Unary

Unary<T, U, V>: (this: V, value: T) => U

Callback invoked for each array element.

param

array element

returns

result

Type parameters

  • T

  • U

  • V

Type declaration

    • (this: V, value: T): U
    • Parameters

      • this: V
      • value: T

      Returns U

Variables

map

map: Routine

Applies a function to each element in an array and assigns the result to an element in a new array.

Notes

  • The applied function is provided the following arguments:

    • value: array element.
    • index: element index.
    • arr: input array.
param

input array

param

function to apply

param

input function context

returns

output array