import { Maybe } from "@sweet-monads/maybe"; type FromIterator = Iterable, T extends Iterable = Iterable> = (source: S) => T; export default class LazyIterator implements Iterable { private readonly source; private readonly operations; private readonly isCycled; static from(iterable: Iterable | LazyIterator): LazyIterator; private static withOperation; private constructor(); append(item: I): LazyIterator; chain(...otherIterators: Array>): LazyIterator; compact(this: LazyIterator): LazyIterator; compress(mask: number[] | boolean[]): LazyIterator; cycle(): LazyIterator; enumarate(): LazyIterator<[number, I]>; except(other: LazyIterator): LazyIterator; filter(predicate: (i: I) => i is T): LazyIterator; filter(predicate: (i: I) => boolean): LazyIterator; filterMap(predicateMapper: (i: I) => Maybe): LazyIterator; filterMap(predicateMapper: (i: I) => T | undefined): LazyIterator; flatten(this: LazyIterator>): LazyIterator; flatMap(fn: (i: I) => LazyIterator): LazyIterator; intersect(other: LazyIterator): LazyIterator; map(fn: (i: I) => T): LazyIterator; permutations(): LazyIterator<[I, I]>; prepend(item: I): LazyIterator; reverse(): LazyIterator; skip(n: number): LazyIterator; scan(fn: (a: A, i: I) => A, accumulator: A): LazyIterator; skipWhile(predicate: (i: I) => boolean): LazyIterator; slice(start?: number, end?: number): LazyIterator; stepBy(step: number): LazyIterator; take(n: number): LazyIterator; takeWhile(predicate: (i: I) => boolean): LazyIterator; unique(): LazyIterator; zip(other: LazyIterator): LazyIterator<[I, T]>; collect(fromIterator?: FromIterator): Iterable; [Symbol.iterator](): Iterator; forEach(fn: (i: I) => void | Maybe): void; all(this: LazyIterator, predicate: (i: I) => i is T): this is LazyIterator; all(predicate: (i: I) => boolean): boolean; any(predicate: (i: I) => boolean): boolean; count(): number; contains(elem: I): boolean; find(predicate: (i: I) => i is T): Maybe; find(predicate: (i: I) => i is T, withoutMaybe: false): Maybe; find(predicate: (i: I) => i is T, withoutMaybe: true): T | undefined; find(predicate: (i: I) => boolean): Maybe; find(predicate: (i: I) => boolean, withoutMaybe: false): Maybe; find(predicate: (i: I) => boolean, withoutMaybe: true): I | undefined; findMap(predicateMapper: (i: I) => Maybe | T | undefined): Maybe; findMap(predicateMapper: (i: I) => Maybe | T | undefined, withoutMaybe: false): Maybe; findMap(predicateMapper: (i: I) => Maybe | T | undefined, withoutMaybe: true): I | undefined; first(): Maybe; first(withoutMaybe: false): Maybe; first(withoutMaybe: true): I | undefined; fold(fn: (a: I, i: I) => I): I; fold(fn: (a: A, i: I) => A, accumulator: A): A; isEmpty(): boolean; last(): Maybe; last(withoutMaybe: false): Maybe; last(withoutMaybe: true): I | undefined; max(this: LazyIterator): Maybe; max(f: (i: I) => number): Maybe; max(f: (i: I) => number, withoutMaybe: false): Maybe; max(f: (i: I) => number, withoutMaybe: true): I | undefined; min(this: LazyIterator): Maybe; min(f?: (i: I) => number): Maybe; min(f: (i: I) => number, withoutMaybe: false): Maybe; min(f: (i: I) => number, withoutMaybe: true): I | undefined; nth(n: number): Maybe; nth(n: number, withoutMaybe: false): Maybe; nth(n: number, withoutMaybe: true): I | undefined; partion(predicate: (i: I) => i is T): [T[], I[]]; partion(predicate: (i: I) => boolean): [I[], I[]]; position(predicate: (i: I) => boolean): Maybe; position(predicate: (i: I) => boolean, withoutMaybe: false): Maybe; position(predicate: (i: I) => boolean, withoutMaybe: true): number | undefined; product(this: LazyIterator): number; sum(this: LazyIterator): number; unzip(this: LazyIterator<[A, B]>): [A[], B[]]; get [Symbol.toStringTag](): string; } export {};