@szilanor/stream
    Preparing search index...

    Function withIndexAsync

    • Returns an AsyncOperationFunction that yields the current and the index of the entry of the source Iterable.

      Type Parameters

      • T

        The type of the elements in the source Iterable.

      Returns AsyncOperationFunction<T, [T, number]>

      An AsyncOperationFunction that yields the current and the index of the entry of the source Iterable.

      const result = withIndexAsync<number>([1, 2, 3]);
      console.log(result); // [[1, 0], [2, 1], [3, 2]]