Type alias MapContext<T>

MapContext<T>: {
    array: readonly T[];
    assertNoFailure: (() => void);
    failed?: boolean;
}

context from xaa.map to the mapper callback

Type Parameters

  • T

Type declaration

  • array: readonly T[]

    the original array that's passed to xaa.map

  • assertNoFailure: (() => void)

    During concurrent map, if any mapper failed, this allow other inflight map functions to assert that no failure has occurred, else stop.

      • (): void
      • Returns void

  • Optional failed?: boolean

    indicate if another map operation during concurrent map has failed Mapping should observe this flag whenever possible and avoid continuing if it makes sense.