lazzy.ts
Version:
Fast and lightweight library for lazy operations with iterable objects.
17 lines • 1.09 kB
TypeScript
import { ILazy, ILazyCollection, ILazyCollectionAsync } from "./contracts";
import * as λ from "./generators";
declare class Lazy implements ILazy {
circular<T>(iterable: Iterable<T>): ILazyCollection<T, void, undefined>;
from<T, R, N>(source: Iterable<T> | Iterator<T, R, N>): ILazyCollection<T, R | void, N | undefined>;
fromAsync<T, R, N>(source: AsyncIterable<T> | AsyncIterator<T, R, N>): ILazyCollectionAsync<T, R | void, N | undefined>;
fibonacci(minimum?: number): ILazyCollection<number, void, number>;
generate<T>(func: () => T): ILazyCollection<T, void, undefined>;
generateAsync<T>(func: () => T | Promise<T>): ILazyCollectionAsync<T, void, undefined>;
prime(minimum?: number): ILazyCollection<number, void, number>;
random(parameters?: Partial<λ.RandomParams>): ILazyCollection<number, void, undefined>;
randomFrom<T>(array: T[]): ILazyCollection<T, void, undefined>;
range(parameters?: Partial<λ.RangeParams>): ILazyCollection<number, void, undefined>;
}
declare const lazy: Lazy;
export default lazy;
//# sourceMappingURL=lazy.d.ts.map