import type { AnyIterable } from "../../types"; /** * Slices an input iterable between the specified start and end indices. * If both start and end indices are non-negative, the slicing is performed lazily. * Otherwise, the slicing is performed greedily. * * @group Lazy/Greedy helpers * @template T - The type of elements in the input iterable. * @param startIndex - Optional. The start index for the slice, defaults to 0. * @param endIndex - Optional. The end index for the slice, defaults to Number.POSITIVE_INFINITY. * @returns A function that accepts an input iterable and returns an async iterable that yields the sliced values. * * @example * ```ts * const input = asyncIterable([1, 2, 3, 4, 5]); * const sliced = slice(1, 4)(input); * * (async () => { * for await (const value of sliced) { * console.log(value); // Logs 2, 3, 4 * } * })(); * ``` */ export declare const slice: (startIndex?: number, endIndex?: number) => (input: AnyIterable) => AsyncIterable>; /** * Slices an input sync iterable between the specified start and end indices. * If both start and end indices are non-negative, the slicing is performed lazily. * Otherwise, the slicing is performed greedily. * * @group Lazy/Greedy helpers * @template T - The type of elements in the input sync iterable. * @param startIndex - Optional. The start index for the slice, defaults to 0. * @param endIndex - Optional. The end index for the slice, defaults to Number.POSITIVE_INFINITY. * @returns A function that accepts an input sync iterable and returns an iterable that yields the sliced values. * * @example * ```ts * const input = [1, 2, 3, 4, 5]; * const slicedSync = sliceSync(1, 4)(input); * * for (const value of slicedSync) { * console.log(value); // Logs 2, 3, 4 * } * ``` * * @remarks * Available as `slice` when imported from `peter-piper/sync`. */ export declare const sliceSync: (startIndex?: number, endIndex?: number) => (input: Iterable) => Iterable;