import { GetContext, SetContext } from "../../../domain/context/context.types"; import { DomainError, Unit } from "../../../domain/general/general.types"; import * as E from "fp-ts/lib/Either"; import * as O from "fp-ts/lib/Option"; import { RuleCombinator } from "../rule.types"; export declare type ValidationErrorHandler = (error: DomainError) => O.Option; export declare type ValidationResolverBuilder = (errorHandler: ValidationErrorHandler) => ValidationResolver; export declare type ValidationResolver = (errorOrValue: E.Either) => O.Option; export declare type Validate = (value?: T) => E.Either; export declare type ValidateContext = (getContext: GetContext) => (setContext: SetContext) => (rule: RuleCombinator) => E.Either;