• Returns the only element of an async-iterable sequence that matches the predicate if specified, or undefined if no such element exists; this method reports an exception if there is more than one element in the async-iterable sequence.

    Type Parameters

    • T

      The type of the elements in the source sequence.

    Parameters

    • source: AsyncIterable<T>

      Source async-iterable sequence.

    • Optional options: OptionalFindOptions<T>

      The optional options which includes a predicate for filtering, thisArg for predicate binding and an abort signal for cancellation.

    Returns Promise<T | undefined>

    A promise with the single element in the async-iterable sequence that satisfies the condition in the predicate, or undefined if no such element exists.

Generated using TypeDoc