• Returns the first element in the provided iterable that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned. Similar to the Array.prototype.find function. See the documentation of the above function for more details.

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>

      Iterable on which to call the map function.

    • callbackFn: ((element: T, index: number) => boolean)

      Function that is called to test every element.

        • (element, index): boolean
        • Parameters

          • element: T
          • index: number

          Returns boolean

    • OptionalthisArg: unknown

      Value to use as this when executing callbackFn.

    Returns T | undefined