@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
11 lines (10 loc) • 555 B
TypeScript
import { OptionalFindOptions } from './findoptions';
/**
* Returns the first element of an iterable sequence that matches the predicate if provided, or undefined if no such element exists.
*
* @export
* @template T The type of the elements in the source sequence.
* @param {Iterable<T>} source Source async-enumerable sequence.
* @returns {(S | undefined)} The first element in the iterable sequence, or undefined if no such element exists.
*/
export declare function first<T>(source: Iterable<T>, options?: OptionalFindOptions<T>): T | undefined;