import { IndexedPredicate } from "../types/IndexedPredicate"; /** * Collects elements from the source iterable until the predicate first returns a truthy value, including that element. * * @typeParam T - Element type produced by the source iterable. * @param src - Source iterable to enumerate. * @param pred - Predicate receiving each element and its index; iteration stops after it returns a truthy value. * @returns A deferred iterable yielding items up to and including the element that satisfies `pred`. * @throws Error Rethrows any error thrown by `pred`. * * @example * ```ts * const inclusive = [..._takeToInclusive([1, 2, 3, 4, 5], (value) => value >= 3)]; * console.log(inclusive); // [1, 2, 3] * ``` * * or using the curried version: * ```ts * const inclusive = [ * ...pipeInto( * [1, 2, 3, 4, 5], * takeToInclusive((value) => value >= 3) * ), * ]; * console.log(inclusive); // [1, 2, 3] * ``` */ export declare function _takeToInclusive(src: Iterable, pred: IndexedPredicate): Iterable; /** * Curried version of {@link _takeToInclusive}. */ export declare const takeToInclusive: (pred: IndexedPredicate) => (src: Iterable) => Iterable;