• Returns the a Promise containing the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns a Promise with -1, indicating that no element passed the test.

    Type Parameters

    • T

      The type of the elements in the source sequence.

    Parameters

    • source: AsyncIterable<T>

      An async-iterable sequence whose elements to apply the predicate to.

    • options: FindOptions<T>

      The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.

    Returns Promise<number>

    A promise containing the index of the first element in the array that passes the test. Otherwise, -1.

Generated using TypeDoc