UNPKG

555 BTypeScriptView Raw
1import { OptionalFindOptions } from './findoptions';
2/**
3 * Returns the first element of an iterable sequence that matches the predicate if provided, or undefined if no such element exists.
4 *
5 * @export
6 * @template T The type of the elements in the source sequence.
7 * @param {Iterable<T>} source Source async-enumerable sequence.
8 * @returns {(S | undefined)} The first element in the iterable sequence, or undefined if no such element exists.
9 */
10export declare function first<T>(source: Iterable<T>, options?: OptionalFindOptions<T>): T | undefined;