• 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


    • iterable: Iterable<T>

      Iterable on which to call the map function.

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

      Function that is called to test every element.

        • (element, index): boolean
        • Parameters

          • element: T
          • index: number

          Returns boolean

    • Optional thisArg: unknown

      Value to use as this when executing callbackFn.

    Returns T | undefined