import { Omit } from './helper-types'; import { DELETE } from './lens-functions'; declare type Path = (string | number | symbol)[]; declare type ProgramHead = [Path, A]; declare type ChainingFn = (data: Y) => (pathValue: A) => Lens; declare type MappingFn = (data: Y) => (pathValue: A) => B; interface Programs extends Array { [index: number]: (ProgramHead | ChainingFn | MappingFn); 0: ProgramHead; } declare type PathValue = NonNullable; export declare class Lens { readonly program: Programs; readonly _A: A; readonly _L: V; readonly _U: Y; readonly _URI: 'babakness/lens'; static readonly _URI: 'babakness/lens'; private static readonly chainHelperName; private static readonly isComposableLensMorphism; constructor(program: Programs); static type(): Lens; static typeChange(): Lens; static of(pathAndDefaultValue: [[K1], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8, K9], PathValue]): Lens, PathValue, PathValue>; static of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8, K9, K10], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1], typeof DELETE]): Lens : V, PathValue, typeof DELETE, PathValue>; of(pathAndDefaultValue: [[K1, K2], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8, K9], PathValue]): Lens, PathValue, PathValue>; of(pathAndDefaultValue: [[K1, K2, K3, K4, K5, K6, K7, K8, K9, K10], PathValue]): Lens, PathValue, PathValue>; map(fn: (pathValue: A) => B): Lens; private mapProgram; ap(fab: Lens B>): Lens; chain(fn: (pathValue: A) => Lens): Lens; private readonly isChainHelper; private getChainHelper; private chainProgram; join

(this: Lens, dataIn: Y): V; join

(this: Lens, dataIn: Y): V; fold(data: Data, fn: (pathValue: A) => B): Y; fold(data: Data): (fn: (pathValue: A) => B) => Y; write(writeValue: A): (data: Data) => Y; write(writeValue: A, data: Data): Y; reduce(fn: (pathValue: A) => B): (data: Data) => Y; reduce(fn: (pathValue: A) => B, data: Data): Y; joinAndRead(data: Data): [V, A, unknown]; reduceAndRead(fn: (pathValue: A) => B): (data: Data) => V; reduceAndRead(fn: (pathValue: A) => B, data: Data): V; read(data: Data): A; preRead(data: Data): keyof Y extends keyof Y ? Data[keyof Y] : unknown; } export {};