import { type Kind } from "../../common/kind"; import { type Left } from "./create"; export declare const errorKind: import("../../common/kind").KindHandler>; /** * @deprecated use errorKind */ export declare const eitherErrorKind: import("../../common/kind").KindHandler>; type _Error = (Left<"error", GenericValue> & Kind); export interface Error extends _Error { } /** * @deprecated use Error */ export type EitherError = Error; /** * Handy alias to create an Left with the info fixed to "error". Useful to signal a generic error without manually providing the info. * * Signature: `error(value)` → returns a value * * The input value is not mutated. * * ```ts * const input = " duplo "; * * const result = pipe( * input, * S.trim, * whenElse( * (value) => equal(S.length(value), 0), * E.error, * E.success, * ), * ); * * // type: E.Error | E.Success * ``` * * @see https://utils.duplojs.dev/en/v1/api/either/error * * @namespace E * */ export declare function error(value: GenericValue): Error; export {};