import type { Optic, TryA, TryT, A, B, S, T } from './optic.js'; import type { Expected } from './errors.js'; import type { Eq } from '../utils.js'; import { Apply, HKT } from '../hkt.js'; interface GuardA extends A { 0: TryA extends ValueType ? SubType : Expected>>; } interface GuardMonoT extends T { 0: TryT extends ValueType ? Eq, SubType> extends true ? ValueType : Expected> : Expected>>; } interface GuardPolyT extends T { 0: TryT extends ValueType ? Apply> : Expected>>; } export declare function guard(): (g: (value: ValueType) => value is SubType) => Optic<'Prism', GuardA, GuardPolyT>; export declare function guard(g: (value: ValueType) => value is SubType): Optic<'Prism', GuardA, GuardMonoT>; export {};