import { Property } from "./Property"; export declare type Lens = ObjectSetLens | ObjectUpdateLens | VanLaarhovenLens; export interface SetOp { (atom: Atom, value: T): void; (atom: Atom): (value: T) => void; } export interface ModifyOp { (atom: Atom, f: (state: T) => T): void; (atom: Atom): (f: (state: T) => T) => void; } export interface ViewOp { (atom: Atom, prop: Prop): Atom; (atom: Atom): (prop: Prop) => Atom; (atom: Atom, lens: Lens): Atom; (atom: Atom): (lens: Lens) => Atom; } export declare function atom(initialValue: T): Atom; export declare const get: typeof _get; export declare const set: SetOp; export declare const modify: ModifyOp; export declare const view: ViewOp; export declare abstract class Atom extends Property { } declare function _get(a: Atom): T; interface Functor { fmap(fn: (a: A) => B): Functor; } interface ObjectSetLens { get(s: S): A; set(a: A, s: S): S; } interface ObjectUpdateLens { get(s: S): A; update(s: S, f: (a: A) => A): S; } declare type VanLaarhovenLens = (a2f: (a: A) => Functor) => (s: S) => Functor; export {};