• Returns the element at a specified index in a sequence or undefined if the index is out of range.

    Type Parameters

    • T

      The type of the elements in the source sequence.

    Parameters

    • source: AsyncIterable<T>

      async-iterable sequence to return the element from.

    • index: number

      The zero-based index of the element to retrieve.

    • Optional signal: AbortSignal

      The optional abort signal to be used for cancelling the sequence at any time.

    Returns Promise<T | undefined>

    An async-iterable sequence that produces the element at the specified position in the source sequence, or undefined if the index is outside the bounds of the source sequence.

Generated using TypeDoc