import type { Optic, Try, Try2 } from './optic.js'; import type { InvalidModifyFn } from './errors.js'; import type { Apply, Apply2, HKT, HKT2 } from '../hkt.js'; import type { Eq, Simplify } from '../utils.js'; export declare function get(optic: Optic, source: S): Apply; export declare function get(optic: Optic): (source: S) => Apply; type Preview = Apply extends infer AU ? Try : never; export declare function preview(optic: Optic, source: S): Preview; export declare function preview(optic: Optic): (source: S) => Preview; type Collect = Apply extends infer AU ? Try : never; export declare function collect(optic: Optic, source: S): Collect; export declare function collect(optic: Optic): (source: S) => Collect; type Modify = Apply extends infer AU ? Apply2 extends infer TU ? Try2> : never : never; type ModifyPartial = Apply extends infer AU ? Apply2 extends infer TU ? Try2 extends true ? Simplify : InvalidModifyFn> : never : never; export declare function modify(optic: Optic, f: (a: Apply) => B, source: S): Modify; export declare function modify(optic: Optic, f: (a: Ac) => B): (source: S) => ModifyPartial; export declare function modify(optic: Optic): (f: (a: Ac) => B) => (source: S) => ModifyPartial; type Set = Apply2 extends infer TU ? Try> : never; export declare function set(optic: Optic, value: B, source: S): Set; export declare function set(optic: Optic, value: B): (source: S) => Set; export declare function set(optic: Optic): (value: B) => (source: S) => Set; export declare function remove(optic: Optic, source: S): S; export declare function remove(optic: Optic): (source: S) => S; export {};