/** @module iterables.ts */ import { Predicate } from './helper-types'; /** * mapIterable */ export declare const _mapIterable: any; /** * Takes a function f and an iterable i and returns an array with f mapped over i * :: ( f -> a -> b ) -> Iterable -> b[] */ export declare function mapIterable(fn: (item: A) => B, itr: Iterable | NodeListOf): B[]; export declare function mapIterable(fn: (item: A) => B): (itr: Iterable | NodeListOf) => B[]; declare type FilterIterable = A extends Node ? (itr: NodeListOf) => A[] : (itr: Iterable) => A[]; export declare function filterIterable(fn: Predicate, itr: Iterable): A[]; export declare function filterIterable(fn: Predicate, itr: NodeListOf): A[]; export declare function filterIterable(fn: Predicate): FilterIterable; export declare function filterIterable(fn: Predicate): FilterIterable; declare type PredicateWithIndex = (item: A, index: number) => boolean; export declare function filterIterableWithIndex(fn: PredicateWithIndex, itr: Iterable): A[]; export declare function filterIterableWithIndex(fn: PredicateWithIndex, itr: NodeListOf): A[]; export declare function filterIterableWithIndex(fn: PredicateWithIndex): FilterIterable; export declare function filterIterableWithIndex(fn: PredicateWithIndex): FilterIterable; export declare const _mapIterableWithIndex: any; /** * Takes a function f and an iterable i and returns an array with f mapped over i with index. Curried * :: ( f -> (a,i) -> b ) -> Iterable -> b[] */ export declare function mapIterableWithIndex(fn: (item: A, index: number) => B, itr: Iterable): B[]; export declare function mapIterableWithIndex(fn: (item: A, index: number) => B): (itr: Iterable) => B[]; /** * Takes any iterable and returns the reverse joined * :: Iter -> str */ export declare const toStringReverse: (iter: Iterable) => string; export {};