Type alias MapFunction<T, O>

MapFunction<T, O>: ((value, index, context) => O | Promise<O>)

callback function for xaa.map to map the value.

Type Parameters

  • T
  • O

Type declaration

    • (value, index, context): O | Promise<O>
    • Parameters

      • value: Awaited<T>

        value to map

      • index: number

        index of the value in the array

      • context: MapContext<T>

        MapContext

      Returns O | Promise<O>

Returns

any or a promise