import { URIS, HKT, Type } from 'fp-ts/lib/HKT'; import { EntryKey, EntryValue, Predicate, Applicative, Functor } from './helper-types'; declare module 'fp-ts/lib/HKT' { interface URI2HKT { 'babakness/transduce': Transduce; 'Array': Array; } } export declare const mapEntryValue: (fn: (a: VA) => VB) => ([k, v]: [K, VA]) => [K, VB]; export declare const mapEntryKey: (fn: (a: KA) => KB) => ([k, v]: [KA, V]) => [KB, V]; export declare const filterEntryValue: (fn: Predicate) => ([k, v]: [K, V]) => boolean; export declare const filterEntryKey: (fn: Predicate) => ([k, v]: [K, V]) => boolean; export declare const mapping: (transform: any) => (reducing: any) => (acc: any, item: any) => any; export declare const filtering: (predicate: (item: any) => boolean) => (reducing: any) => (acc: any, item: any) => any; export declare const filterReducer: (predicate: (acc: any, item: any) => boolean) => (reducing: any) => (acc: any, item: any) => any; export declare const reduceEntries: (acc: any, [k, v]: [any, any]) => { [x: number]: any; }; export declare class Transduce { readonly list: A[]; readonly xform: (reducing: any) => (acc: any, item: any) => any; readonly _A: A; readonly _URI: 'babakness/transduce'; static readonly _URI: 'babakness/transduce'; constructor(list: A[], xform?: (reducing: any) => (acc: any, item: any) => any); static of(xs: B[]): Transduce; static of(xs: B[]): Transduce; private static spreadArgsCompose; private compose; map(fn: (a: A) => B): Transduce; mapEntryKey, KB, V extends EntryValue>(fn: (a: KA) => KB): Transduce<[KB, V]>; mapEntryValue, VA extends EntryValue, VB>(fn: (a: VA) => VB): Transduce<[K, VB]>; filterType(predicate: (a: A) => a is B): Transduce; filter(predicate: (a: A) => boolean): Transduce; filterEntryKey>(predicate: (a: K) => boolean): Transduce; filterEntryKeyType, V extends EntryValue, KT extends K>(predicate: (a: K) => a is KT): Transduce<[KT, V]>; filterEntryValue>(predicate: (a: V) => boolean): Transduce; filterEntryValueType, V extends EntryValue, VT extends V>(predicate: (a: V) => a is VT): Transduce<[K, VT]>; chain(fn: (a: A) => Transduce): Transduce; ap(other: Transduce<(a: A) => B>): Transduce; take(n: number): Transduce; every(n: number, offset?: number): Transduce; /** * order switched for compatibility with fp-ts library */ fold(init: B, concat: (acc: B, item: A) => B): B; reduce(concat: (acc: B, item: A) => B, init: B): B; join(concat?: (acc: any, item: any) => any, init?: never[]): A[]; /** * If the inner value is of form [K,V][] (see this `param` for details), * then this method will reduce or fold the inner value into an object. */ joinEntries(this: Transduce, init?: {}): { [k: string]: A extends [K, (infer U)] ? U : A; }; traverseLegacy(this: Transduce>, of: (a: Transduce) => Type>, fn: (a: B) => C): Type>; traverse(F: Applicative, fn: (a: A) => HKT & Functor): Type>; sequenceLegacy(this: Transduce>, of: (a: Transduce) => Type>): Type>; sequence(this: Transduce>, F: Applicative | never[] | B[]>): Type>; traverse_(this: Transduce>, of: (a: Transduce) => Type>, fn: (a: Type) => HKT): Type>; sequenceNonStandardFunctor(this: Transduce>, of: (a: Transduce) => Type>): Type>; }