import type { HKT, HKT2 } from '../hkt.js'; import type { OpticError } from './errors.js'; export type Class = 'Equivalence' | 'Iso' | 'Lens' | 'Prism' | 'Traversal' | 'Getter' | 'AffineFold' | 'Fold' | 'Setter'; export type A = HKT; export type T = HKT2; export type S = F[1]; export type B = F[2]; export type Removable = true | undefined; export interface Optic { readonly _tag: C; readonly _A: A; readonly _T: T; readonly _removable: R; } export type Try = P extends OpticError ? P : U; export type Try2 = P1 extends OpticError ? P1 : P2 extends OpticError ? P2 : U; export type TryA

= Try, U>; export type TryT

= Try2, B

, U>;