/** * A collection of utility functions for working with iterables. * @category Modules */ export declare namespace Iter { /** * Iterates over a range between [from, to) with a given `step`, while avoiding infinite loops. * @param from The start of the range. * @param to The end of the range. * @param step The step size. * @param maxCount The maximum number of values to yield. * @returns A generator that yields values in the range. */ function range(from: number, to: number, step: number, maxCount?: number): Generator; /** * Yield `from`, `to`, and values between them with a given `step` and `offset`. It avoids infinite loops by clamping the number of iterations. * @param from The start of the range. * @param to The end of the range. * @param step The step size. * @param offset The offset to apply to the range. * @param maxCount The maximum number of values to yield. */ function rangeWithOffset(from: number, to: number, step: number, offset: number, maxCount?: number): Generator; /** * Yields tuples of values from the input generator, where each tuple contains the current and previous values. * @param iter The input generator. * @returns A generator that yields tuples of values. */ function tuple(iter: Iterable): Generator<[T, T]>; /** * Yields tuples of values from the input generator, where its first element is the index of the value and the second one is the value itself. * @param iter The input generator. */ function enumerate(iter: Iterable): Generator<[number, T]>; interface ResampleOptions { /** * The step size to use for resampling. If not provided, the step size will be calculated based on the `count` and `align` options. * @default `to - from` */ step?: number; /** * How to align the resampled values. * @default `'uniform'` */ align?: 'uniform' | 'start' | 'center' | 'end'; /** * The number of samples to generate. If this is specified, the `step` will be ignored and the number will be distributed uniformly across the range. * @default `undefined` */ count?: number; /** * Whether to emit the `from` value. * @default `true` */ emitFrom?: boolean; /** * Whether to emit the `to` value. * @default `true` */ emitTo?: boolean; } function resample(from: number, to: number, { step, align, count, emitFrom, emitTo, }?: ResampleOptions): Generator; } //# sourceMappingURL=Iter.d.ts.map