/** * @since 1.0.0 */ import type { LazyArg } from "@fp-ts/core/Function"; import type { Kind, TypeLambda } from "@fp-ts/core/HKT"; import type { Option } from "@fp-ts/core/Option"; import type { Predicate, Refinement } from "@fp-ts/core/Predicate"; import * as applicative from "@fp-ts/core/typeclass/Applicative"; import * as bicovariant from "@fp-ts/core/typeclass/Bicovariant"; import * as chainable from "@fp-ts/core/typeclass/Chainable"; import * as covariant from "@fp-ts/core/typeclass/Covariant"; import type { Equivalence } from "@fp-ts/core/typeclass/Equivalence"; import * as flatMap_ from "@fp-ts/core/typeclass/FlatMap"; import * as foldable from "@fp-ts/core/typeclass/Foldable"; import * as invariant from "@fp-ts/core/typeclass/Invariant"; import type * as monad from "@fp-ts/core/typeclass/Monad"; import type { Monoid } from "@fp-ts/core/typeclass/Monoid"; import * as of_ from "@fp-ts/core/typeclass/Of"; import type * as pointed from "@fp-ts/core/typeclass/Pointed"; import * as product_ from "@fp-ts/core/typeclass/Product"; import type * as semiAlternative from "@fp-ts/core/typeclass/SemiAlternative"; import * as semiApplicative from "@fp-ts/core/typeclass/SemiApplicative"; import * as semiCoproduct from "@fp-ts/core/typeclass/SemiCoproduct"; import type { Semigroup } from "@fp-ts/core/typeclass/Semigroup"; import * as semiProduct from "@fp-ts/core/typeclass/SemiProduct"; import * as traversable from "@fp-ts/core/typeclass/Traversable"; /** * @category models * @since 1.0.0 */ export interface Left { readonly _tag: "Left"; readonly left: E; } /** * @category models * @since 1.0.0 */ export interface Right { readonly _tag: "Right"; readonly right: A; } /** * @category models * @since 1.0.0 */ export type Either = Left | Right; /** * @category type lambdas * @since 1.0.0 */ export interface EitherTypeLambda extends TypeLambda { readonly type: Either; } /** * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias * of this structure. * * @category constructors * @since 1.0.0 */ export declare const right: (a: A) => Either; /** * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this * structure. * * @category constructors * @since 1.0.0 */ export declare const left: (e: E) => Either; /** * Alias of {@link right}. * * @category constructors * @since 1.0.0 */ export declare const of: (a: A) => Either; /** * Tests if a value is a `Either`. * * @param input - The value to test. * * @example * import { isEither, left, right } from '@fp-ts/core/Either' * * assert.deepStrictEqual(isEither(right(1)), true) * assert.deepStrictEqual(isEither(left("error")), true) * assert.deepStrictEqual(isEither({ right: 1 }), false) * * @category guards * @since 1.0.0 */ export declare const isEither: (input: unknown) => input is Either; /** * Determine if a `Either` is a `Left`. * * @param self - The `Either` to check. * * @example * import { isLeft, left, right } from '@fp-ts/core/Either' * * assert.deepStrictEqual(isLeft(right(1)), false) * assert.deepStrictEqual(isLeft(left("error")), true) * * @category guards * @since 1.0.0 */ export declare const isLeft: (self: Either) => self is Left; /** * Determine if a `Either` is a `Right`. * * @param self - The `Either` to check. * * @example * import { isRight, left, right } from '@fp-ts/core/Either' * * assert.deepStrictEqual(isRight(right(1)), true) * assert.deepStrictEqual(isRight(left("error")), false) * * @category guards * @since 1.0.0 */ export declare const isRight: (self: Either) => self is Right; /** * Returns a `Refinement` from a `Either` returning function. * This function ensures that a `Refinement` definition is type-safe. * * @category conversions * @since 1.0.0 */ export declare const toRefinement: (f: (a: A) => Either) => Refinement; /** * @category conversions * @since 1.0.0 */ export declare const fromIterable: { (onEmpty: LazyArg): (collection: Iterable) => Either; (collection: Iterable, onEmpty: LazyArg): Either; }; /** * Converts a `Either` to an `Option` discarding the error. * * @param self - The `Either` to convert to an `Option`. * * @example * import * as O from '@fp-ts/core/Option' * import * as E from '@fp-ts/core/Either' * * assert.deepStrictEqual(E.toOption(E.right(1)), O.some(1)) * assert.deepStrictEqual(E.toOption(E.left('a')), O.none()) * * @category conversions * @since 1.0.0 */ export declare const toOption: (self: Either) => Option; /** * Converts a `Either` to an `Option` discarding the error. * * Alias of {@link toOption}. * * @example * import * as O from '@fp-ts/core/Option' * import * as E from '@fp-ts/core/Either' * * assert.deepStrictEqual(E.getRight(E.right('ok')), O.some('ok')) * assert.deepStrictEqual(E.getRight(E.left('err')), O.none()) * * @category conversions * @since 1.0.0 */ export declare const getRight: (self: Either) => Option; /** * Converts a `Either` to an `Option` discarding the value. * * @example * import * as O from '@fp-ts/core/Option' * import * as E from '@fp-ts/core/Either' * * assert.deepStrictEqual(E.getLeft(E.right('ok')), O.none()) * assert.deepStrictEqual(E.getLeft(E.left('err')), O.some('err')) * * @category conversions * @since 1.0.0 */ export declare const getLeft: (self: Either) => Option; /** * @example * import * as E from '@fp-ts/core/Either' * import * as O from '@fp-ts/core/Option' * * assert.deepStrictEqual(E.fromOption(O.some(1), () => 'error'), E.right(1)) * assert.deepStrictEqual(E.fromOption(O.none(), () => 'error'), E.left('error')) * * @category conversions * @since 1.0.0 */ export declare const fromOption: { (fa: Option, onNone: () => E): Either; (onNone: () => E): (fa: Option) => Either; }; /** * @category equivalence * @since 1.0.0 */ export declare const getEquivalence: (EE: Equivalence, EA: Equivalence) => Equivalence>; /** * @category mapping * @since 1.0.0 */ export declare const bimap: { (f: (e: E1) => E2, g: (a: A) => B): (self: Either) => Either; (self: Either, f: (e: E1) => E2, g: (a: A) => B): Either; }; /** * @category instances * @since 1.0.0 */ export declare const Bicovariant: bicovariant.Bicovariant; /** * Maps the `Left` side of an `Either` value to a new `Either` value. * * @param self - The input `Either` value to map. * @param f - A transformation function to apply to the `Left` value of the input `Either`. * * @category error handling * @since 1.0.0 */ export declare const mapLeft: { (f: (e: E) => G): (self: Either) => Either; (self: Either, f: (e: E) => G): Either; }; /** * Maps the `Right` side of an `Either` value to a new `Either` value. * * @param self - An `Either` to map * @param f - The function to map over the value of the `Either` * * @category mapping * @since 1.0.0 */ export declare const map: { (f: (a: A) => B): (self: Either) => Either; (self: Either, f: (a: A) => B): Either; }; /** * @category instances * @since 1.0.0 */ export declare const Covariant: covariant.Covariant; /** * @category instances * @since 1.0.0 */ export declare const Invariant: invariant.Invariant; /** * @category mapping * @since 1.0.0 */ export declare const tupled: (self: Either) => Either; /** * @category mapping * @since 1.0.0 */ export declare const flap: { (a: A, self: Either B>): Either; (self: Either B>): (a: A) => Either; }; /** * Maps the Right value of this effect to the specified constant value. * * @category mapping * @since 1.0.0 */ export declare const as: { (self: Either, b: B): Either; (b: B): (self: Either) => Either; }; /** * Returns the effect Eithering from mapping the Right of this effect to unit. * * @category mapping * @since 1.0.0 */ export declare const asUnit: (self: Either) => Either; /** * @category instances * @since 1.0.0 */ export declare const Of: of_.Of; /** * @since 1.0.0 */ export declare const unit: Either; /** * @category instances * @since 1.0.0 */ export declare const Pointed: pointed.Pointed; /** * @category sequencing * @since 1.0.0 */ export declare const flatMap: { (f: (a: A) => Either): (self: Either) => Either; (self: Either, f: (a: A) => Either): Either; }; /** * @category instances * @since 1.0.0 */ export declare const FlatMap: flatMap_.FlatMap; /** * @since 1.0.0 */ export declare const flatten: (self: Either>) => Either; /** * @since 1.0.0 */ export declare const andThen: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @since 1.0.0 */ export declare const composeKleisliArrow: { (afb: (a: A) => Either, bfc: (b: B) => Either): (a: A) => Either; (bfc: (b: B) => Either): (afb: (a: A) => Either) => (a: A) => Either; }; /** * @category instances * @since 1.0.0 */ export declare const Chainable: chainable.Chainable; /** * Sequences the specified effect after this effect, but ignores the value * produced by the effect. * * @category sequencing * @since 1.0.0 */ export declare const andThenDiscard: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @category instances * @since 1.0.0 */ export declare const Monad: monad.Monad; /** * @category instances * @since 1.0.0 */ export declare const SemiProduct: semiProduct.SemiProduct; /** * Appends an element to the end of a tuple. * * @since 1.0.0 */ export declare const appendElement: { , E2, B>(self: Either, that: Either): Either; (that: Either): >(self: Either) => Either; }; /** * @category instances * @since 1.0.0 */ export declare const Product: product_.Product; /** * @since 1.0.0 */ export declare const tuple: >>(...tuple: T) => Either<[ T[number] ] extends [Either] ? E : never, { [I in keyof T]: [T[I]] extends [Either] ? A : never; }>; /** * @since 1.0.0 */ export declare const struct: >>(r: R) => Either<[ R[keyof R] ] extends [Either] ? E : never, { [K in keyof R]: [R[K]] extends [Either] ? A : never; }>; /** * @category instances * @since 1.0.0 */ export declare const SemiApplicative: semiApplicative.SemiApplicative; /** * Lifts a binary function into `Either`. * * @param f - The function to lift. * * @category lifting * @since 1.0.0 */ export declare const lift2: (f: (a: A, b: B) => C) => { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @category combining * @since 1.0.0 */ export declare const zipWith: { (self: Either, that: Either, f: (a: A, b: B) => C): Either; (that: Either, f: (a: A, b: B) => C): (self: Either) => Either; }; /** * @since 1.0.0 */ export declare const ap: { (self: Either B>, that: Either): Either; (that: Either): (self: Either B>) => Either; }; /** * @category instances * @since 1.0.0 */ export declare const Applicative: applicative.Applicative; /** * `Semigroup` returning the left-most `Left` value. If both operands are `Right`s then the inner values * are combined using the provided `Semigroup`. * * ``` * | self | that | combine(self, that) | * | ---------- | ---------- | ----------------------- | * | left(e1) | left(e2) | left(e1) | * | left(e1) | right(a2) | left(e1) | * | right(a1) | left(e2) | left(e2) | * | right(a1) | right(a2) | right(combine(a1, a2)) | * ``` * * @category combining * @since 1.0.0 */ export declare const getFirstLeftSemigroup: (S: Semigroup) => Semigroup>; /** * `Monoid` returning the left-most `Left` value. If both operands are `Right`s then the inner values * are combined using the provided `Monoid`. * * - `combine` is provided by {@link getFirstLeftSemigroup}. * - `empty` is `right(M.empty)` * * @category combining * @since 1.0.0 */ export declare const getFirstLeftMonoid: (M: Monoid) => Monoid>; /** * @category instances * @since 1.0.0 */ export declare const SemiCoproduct: semiCoproduct.SemiCoproduct; /** * @category error handling * @since 1.0.0 */ export declare const firstRightOf: { (collection: Iterable>): (self: Either) => Either; (self: Either, collection: Iterable>): Either; }; /** * Semigroup returning the left-most `Right` value. * * ``` * | self | that | combine(self, that) | * | ---------- | ---------- | ------------------- | * | left(e1) | left(e2) | left(e2) | * | left(e1) | right(a2) | right(a2) | * | right(a1) | left(e2) | right(a1) | * | right(a1) | right(a2) | right(a1) | * ``` * * @category combining * @since 1.0.0 */ export declare const getFirstRightSemigroup: () => Semigroup>; /** * Returns the wrapped value if it's a `Right` or a default value if is a `Left`. * * @example * import * as E from '@fp-ts/core/Either' * import { pipe } from '@fp-ts/core/Function' * * assert.deepStrictEqual( * E.getOrElse(E.right(1), () => 0), * 1 * ) * assert.deepStrictEqual( * E.getOrElse(E.left('error'), () => 0), * 0 * ) * * @category getters * @since 1.0.0 */ export declare const getOrElse: { (onLeft: (e: E) => B): (self: Either) => B | A; (self: Either, onLeft: (e: E) => B): A | B; }; /** * Executes this effect and returns its value, if it succeeds, but otherwise * executes the specified effect. * * @category error handling * @since 1.0.0 */ export declare const orElse: { (that: (e1: E1) => Either): (self: Either) => Either; (self: Either, that: (e1: E1) => Either): Either; }; /** * Returns an effect that will produce the value of this effect, unless it * fails, in which case, it will produce the value of the specified effect. * * @category error handling * @since 1.0.0 */ export declare const orElseEither: { (that: (e1: E1) => Either): (self: Either) => Either>; (self: Either, that: (e1: E1) => Either): Either>; }; /** * Executes this effect and returns its value, if it succeeds, but otherwise * fails with the specified error. * * @category error handling * @since 1.0.0 */ export declare const orElseFail: { (onLeft: LazyArg): (self: Either) => Either; (self: Either, onLeft: LazyArg): Either; }; /** * @category instances * @since 1.0.0 */ export declare const SemiAlternative: semiAlternative.SemiAlternative; /** * @category instances * @since 1.0.0 */ export declare const Foldable: foldable.Foldable; /** * Transforms an `Either` into an `Array`. * If the input is `Left`, an empty array is returned. * If the input is `Right`, the value is wrapped in an array. * * @param self - The `Either` to convert to an array. * * @example * import { right, left, toArray } from '@fp-ts/core/Either' * * assert.deepStrictEqual(toArray(right(1)), [1]) * assert.deepStrictEqual(toArray(left("error")), []) * * @category conversions * @since 1.0.0 */ export declare const toArray: (self: Either) => Array; /** * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the first function, * if the value is a `Right` the inner value is applied to the second function. * * @example * import * as E from '@fp-ts/core/Either' * import { pipe } from '@fp-ts/core/Function' * * const onLeft = (errors: ReadonlyArray): string => `Errors: ${errors.join(', ')}` * * const onRight = (value: number): string => `Ok: ${value}` * * assert.deepStrictEqual( * pipe( * E.right(1), * E.match(onLeft , onRight) * ), * 'Ok: 1' * ) * assert.deepStrictEqual( * pipe( * E.left(['error 1', 'error 2']), * E.match(onLeft , onRight) * ), * 'Errors: error 1, error 2' * ) * * @category pattern matching * @since 1.0.0 */ export declare const match: { (onLeft: (e: E) => B, onRight: (a: A) => C): (self: Either) => B | C; (self: Either, onLeft: (e: E) => B, onRight: (a: A) => C): B | C; }; /** * Takes a lazy default and a nullable value, if the value is not nully, turn it into a `Right`, if the value is nully use * the provided default as a `Left`. * * @example * import * as E from '@fp-ts/core/Either' * * const parse = E.fromNullable(() => 'nullable') * * assert.deepStrictEqual(parse(1), E.right(1)) * assert.deepStrictEqual(parse(null), E.left('nullable')) * * @category interop * @since 1.0.0 */ export declare const fromNullable: { (onNullable: (a: A) => E): (a: A) => Either>; (a: A, onNullable: (a: A) => E): Either>; }; /** * @category interop * @since 1.0.0 */ export declare const liftNullable: (f: (...a: A) => B | null | undefined, onNullable: (...a: A) => E) => (...a: A) => Either>; /** * @category interop * @since 1.0.0 */ export declare const merge: (self: Either) => E | A; /** * @category sequencing * @since 1.0.0 */ export declare const flatMapNullable: { (f: (a: A) => B | null | undefined, onNullable: (a: A) => E2): (self: Either) => Either>; (self: Either, f: (a: A) => B | null | undefined, onNullable: (a: A) => E2): Either>; }; /** * Extracts the value of an `Either` or throws if the `Either` is `Left`. * * If a default error is sufficient for your use case and you don't need to configure the thrown error, see {@link getOrThrow}. * * @param self - The `Either` to extract the value from. * @param onLeft - A function that will be called if the `Either` is `Left`. It returns the error to be thrown. * * @example * import * as E from "@fp-ts/core/Either" * * assert.deepStrictEqual( * E.getOrThrowWith(E.right(1), () => new Error('Unexpected Left')), * 1 * ) * assert.throws(() => E.getOrThrowWith(E.left("error"), () => new Error('Unexpected Left'))) * * @category interop * @since 1.0.0 */ export declare const getOrThrowWith: { (onLeft: (e: E) => unknown): (self: Either) => A; (self: Either, onLeft: (e: E) => unknown): A; }; /** * Extracts the value of an `Either` or throws if the `Either` is `Left`. * * The thrown error is a default error. To configure the error thrown, see {@link getOrThrowWith}. * * @param self - The `Either` to extract the value from. * @throws `Error("getOrThrow called on a Left")` * * @example * import * as E from "@fp-ts/core/Either" * * assert.deepStrictEqual(E.getOrThrow(E.right(1)), 1) * assert.throws(() => E.getOrThrow(E.left("error"))) * * @category interop * @since 1.0.0 */ export declare const getOrThrow: (self: Either) => A; /** * Lifts a function that may throw to one returning a `Either`. * * @category interop * @since 1.0.0 */ export declare const liftThrowable: (f: (...a: A) => B, onThrow: (error: unknown) => E) => (...a: A) => Either; /** * @since 1.0.0 */ export declare const reverse: (self: Either) => Either; /** * @category filtering * @since 1.0.0 */ export declare const filter: { (refinement: Refinement, onFalse: LazyArg): (self: Either) => Either; (predicate: Predicate, onFalse: LazyArg): (self: Either) => Either; (self: Either, refinement: Refinement, onFalse: LazyArg): Either; (self: Either, predicate: Predicate, onFalse: LazyArg): Either; }; /** * @category filtering * @since 1.0.0 */ export declare const filterMap: { (f: (a: A) => Option, onNone: LazyArg): (self: Either) => Either; (self: Either, f: (a: A) => Option, onNone: LazyArg): Either; }; /** * @category filtering * @since 1.0.0 */ export declare const compact: { (onNone: LazyArg): (self: Either>) => Either; (self: Either>, onNone: LazyArg): Either; }; /** * @category traversing * @since 1.0.0 */ export declare const traverse: (F: applicative.Applicative) => { (f: (a: A) => Kind): (self: Either) => Kind>; (self: Either, f: (a: A_1) => Kind): Kind>; }; /** * @category instances * @since 1.0.0 */ export declare const Traversable: traversable.Traversable; /** * @category traversing * @since 1.0.0 */ export declare const sequence: (F: applicative.Applicative) => (self: Either>) => Kind>; /** * @category traversing * @since 1.0.0 */ export declare const traverseTap: (F: applicative.Applicative) => { (self: Either, f: (a: A) => Kind): Kind>; (f: (a: A) => Kind): (self: Either) => Kind>; }; /** * Returns an effect that effectfully "peeks" at the success of this effect. * * @category combinators * @since 1.0.0 */ export declare const tap: { (self: Either, f: (a: A) => Either): Either; (f: (a: A) => Either): (self: Either) => Either; }; /** * @category debugging * @since 1.0.0 */ export declare const inspectRight: { (onRight: (a: A) => void): (self: Either) => Either; (self: Either, onRight: (a: A) => void): Either; }; /** * @category debugging * @since 1.0.0 */ export declare const inspectLeft: { (onLeft: (e: E) => void): (self: Either) => Either; (self: Either, onLeft: (e: E) => void): Either; }; /** * Returns an effect that effectfully "peeks" at the failure of this effect. * * @category error handling * @since 1.0.0 */ export declare const tapError: { (onLeft: (e: E1) => Either): (self: Either) => Either; (self: Either, onLeft: (e: E1) => Either): Either; }; /** * @category getters * @since 1.0.0 */ export declare const getOrNull: (self: Either) => A | null; /** * @category getters * @since 1.0.0 */ export declare const getOrUndefined: (self: Either) => A | undefined; /** * @example * import { liftPredicate, left, right } from '@fp-ts/core/Either' * import { pipe } from '@fp-ts/core/Function' * * assert.deepStrictEqual( * pipe( * 1, * liftPredicate((n) => n > 0, () => 'error') * ), * right(1) * ) * assert.deepStrictEqual( * pipe( * -1, * liftPredicate((n) => n > 0, () => 'error') * ), * left('error') * ) * * @category lifting * @since 1.0.0 */ export declare const liftPredicate: { (refinement: Refinement, onFalse: (c: C) => E): (c: C) => Either; (predicate: Predicate, onFalse: (b: B) => E): (b: B) => Either; }; /** * @category lifting * @since 1.0.0 */ export declare const liftOption: (f: (...a: A) => Option, onNone: (...a: A) => E) => (...a: A) => Either; /** * @category sequencing * @since 1.0.0 */ export declare const flatMapOption: { (f: (a: A) => Option, onNone: (a: A) => E2): (self: Either) => Either; (self: Either, f: (a: A) => Option, onNone: (a: A) => E2): Either; }; /** * Returns a function that checks if an `Either` contains a given value using a provided `equivalence` function. * * @since 1.0.0 */ export declare const contains: (isEquivalent: (self: A, that: A) => boolean) => { (a: A): (self: Either) => boolean; (self: Either, a: A): boolean; }; /** * Returns `false` if `Left` or returns the Either of the application of the given predicate to the `Right` value. * * @example * import * as E from '@fp-ts/core/Either' * * const f = E.exists((n: number) => n > 2) * * assert.deepStrictEqual(f(E.left('a')), false) * assert.deepStrictEqual(f(E.right(1)), false) * assert.deepStrictEqual(f(E.right(3)), true) * * @since 1.0.0 */ export declare const exists: { (predicate: Predicate): (self: Either) => boolean; (self: Either, predicate: Predicate): boolean; }; /** * Semigroup that models the combination of values that may be absent, elements that are `Left` are ignored * while elements that are `Right` are combined using the provided `Semigroup`. * * @category instances * @since 1.0.0 */ export declare const getOptionalSemigroup: (S: Semigroup) => Semigroup>; /** * @category algebraic operations * @since 1.0.0 */ export declare const sum: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @category algebraic operations * @since 1.0.0 */ export declare const multiply: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @category algebraic operations * @since 1.0.0 */ export declare const subtract: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * @category algebraic operations * @since 1.0.0 */ export declare const divide: { (self: Either, that: Either): Either; (that: Either): (self: Either) => Either; }; /** * Return all the `Right` elements from an `Interable` of `Either`s. * * @category getters * @since 1.0.0 */ export declare const rights: (self: Iterable>) => A[]; /** * Return all the `Left` elements from an `Interable` of `Either`s. * * @category getters * @since 1.0.0 */ export declare const lefts: (self: Iterable>) => E[]; /** * @category do notation * @since 1.0.0 */ export declare const bindTo: { (name: N): (self: Either) => Either; (self: Either, name: N): Either; }; declare const let_: { (name: Exclude, f: (a: A) => B): (self: Either) => Either; (self: Either, name: Exclude, f: (a: A) => B): Either; }; export { /** * @category do notation * @since 1.0.0 */ let_ as let }; /** * @category do notation * @since 1.0.0 */ export declare const Do: Either; /** * @category do notation * @since 1.0.0 */ export declare const bind: { (name: Exclude, f: (a: A) => Either): (self: Either) => Either; (self: Either, name: Exclude, f: (a: A) => Either): Either; }; /** * Extends the `Either` value with the value of another `Either` type. * * If both `Either` instances are `Left`, then the result will be the first `Left`. * * @param self - The original `Either` value. * @param name - The name of the property that will be added to the original `Either` type. * @param that - The `Either` value that will be added to the original `Either` type. * * @example * import * as E from '@fp-ts/core/Either' * import { pipe } from '@fp-ts/core/Function' * * const result = pipe( * E.Do, * E.bind("a", () => E.left("e1")), * E.andThenBind("b", E.left("e2")) * ) * * assert.deepStrictEqual(result, E.left("e1")) * * @category do notation * @since 1.0.0 */ export declare const andThenBind: { (name: Exclude, that: Either): (self: Either) => Either; (self: Either, name: Exclude, that: Either): Either; }; //# sourceMappingURL=Either.d.ts.map