UNPKG

640 BTypeScriptView Raw
1import { FindOptions } from './findoptions';
2/**
3 * Returns the value of the first element in the provided iterable that satisfies the provided testing function.
4 *
5 * @export
6 * @template T The type of the elements in the source sequence.
7 * @param {Iterable<T>} source An iterable sequence whose elements to apply the predicate to.
8 * @param {FindOptions<T>} options The options for a predicate for filtering, thisArg for binding and AbortSignal for cancellation.
9 * @returns {(T | undefined)} The first element that matches the predicate.
10 */
11export declare function find<T>(source: Iterable<T>, options: FindOptions<T>): T | undefined;