/** * @since 2.0.0 */ import { Alt3, Alt3C } from './Alt.js'; import { Applicative3, Applicative3C } from './Applicative.js'; import { Apply3 } from './Apply.js'; import { Bifunctor3 } from './Bifunctor.js'; import * as chainable from './Chain.js'; import { Compactable3C } from './Compactable.js'; import * as E from './Either.js'; import { Filterable3C } from './Filterable.js'; import { FromEither3 } from './FromEither.js'; import { FromReader3 } from './FromReader.js'; import { LazyArg } from './function.js'; import { Functor3 } from './Functor.js'; import { Monad3, Monad3C } from './Monad.js'; import { MonadThrow3, MonadThrow3C } from './MonadThrow.js'; import { Monoid } from './Monoid.js'; import { Option } from './Option.js'; import { Pointed3 } from './Pointed.js'; import { Predicate } from './Predicate.js'; import * as R from './Reader.js'; import { ReadonlyNonEmptyArray } from './ReadonlyNonEmptyArray.js'; import { Refinement } from './Refinement.js'; import { Semigroup } from './Semigroup.js'; type Reader = R.Reader; type Either = E.Either; /** * @category model * @since 2.0.0 */ export interface ReaderEither extends Reader> { } /** * @category constructors * @since 2.0.0 */ export declare const left: (e: E) => ReaderEither; /** * @category constructors * @since 2.0.0 */ export declare const right: (a: A) => ReaderEither; /** * @category constructors * @since 2.0.0 */ export declare const rightReader: (ma: Reader) => ReaderEither; /** * @category constructors * @since 2.0.0 */ export declare const leftReader: (me: Reader) => ReaderEither; /** * @category conversions * @since 2.0.0 */ export declare const fromEither: (fa: Either) => ReaderEither; /** * @category conversions * @since 2.11.0 */ export declare const fromReader: (fa: Reader) => ReaderEither; /** * @category pattern matching * @since 2.10.0 */ export declare const match: (onLeft: (e: E) => B, onRight: (a: A) => B) => (ma: ReaderEither) => Reader; /** * Less strict version of [`match`](#match). * * The `W` suffix (short for **W**idening) means that the handler return types will be merged. * * @category pattern matching * @since 2.10.0 */ export declare const matchW: (onLeft: (e: E) => B, onRight: (a: A) => C) => (ma: Reader>) => Reader; /** * The `E` suffix (short for **E**ffect) means that the handlers return an effect (`Reader`). * * @category pattern matching * @since 2.10.0 */ export declare const matchE: (onLeft: (e: E) => Reader, onRight: (a: A) => Reader) => (ma: ReaderEither) => Reader; /** * Alias of [`matchE`](#matche). * * @category pattern matching * @since 2.0.0 */ export declare const fold: (onLeft: (e: E) => Reader, onRight: (a: A) => Reader) => (ma: ReaderEither) => Reader; /** * Less strict version of [`matchE`](#matche). * * The `W` suffix (short for **W**idening) means that the handler return types will be merged. * * @category pattern matching * @since 2.10.0 */ export declare const matchEW: (onLeft: (e: E) => Reader, onRight: (a: A) => Reader) => (ma: ReaderEither) => Reader; /** * Alias of [`matchEW`](#matchew). * * @category pattern matching * @since 2.10.0 */ export declare const foldW: (onLeft: (e: E) => Reader, onRight: (a: A) => Reader) => (ma: ReaderEither) => Reader; /** * @category error handling * @since 2.0.0 */ export declare const getOrElse: (onLeft: (e: E) => Reader) => (ma: ReaderEither) => Reader; /** * Less strict version of [`getOrElse`](#getorelse). * * The `W` suffix (short for **W**idening) means that the handler return type will be merged. * * @category error handling * @since 2.6.0 */ export declare const getOrElseW: (onLeft: (e: E) => Reader) => (ma: ReaderEither) => Reader; /** * @category conversions * @since 2.10.0 */ export declare const toUnion: (fa: ReaderEither) => Reader; /** * Changes the value of the local context during the execution of the action `ma` (similar to `Contravariant`'s * `contramap`). * * @since 2.0.0 */ export declare const local: (f: (r2: R2) => R1) => (ma: ReaderEither) => ReaderEither; /** * Less strict version of [`asksReaderEither`](#asksreadereither). * * The `W` suffix (short for **W**idening) means that the environment types will be merged. * * @category constructors * @since 2.11.0 */ export declare const asksReaderEitherW: (f: (r1: R1) => ReaderEither) => ReaderEither; /** * Effectfully accesses the environment. * * @category constructors * @since 2.11.0 */ export declare const asksReaderEither: (f: (r: R) => ReaderEither) => ReaderEither; /** * @category error handling * @since 2.0.0 */ export declare const orElse: (onLeft: (e: E1) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Less strict version of [`orElse`](#orelse). * * The `W` suffix (short for **W**idening) means that the environment types and the return types will be merged. * * @category error handling * @since 2.10.0 */ export declare const orElseW: (onLeft: (e: E1) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Returns an effect that effectfully "peeks" at the failure of this effect. * * @category error handling * @since 2.15.0 */ export declare const tapError: { (onLeft: (e: E1) => ReaderEither): (self: ReaderEither) => ReaderEither; (self: ReaderEither, onLeft: (e: E1) => ReaderEither): ReaderEither; }; /** * @category error handling * @since 2.11.0 */ export declare const orLeft: (onLeft: (e: E1) => Reader) => (fa: ReaderEither) => ReaderEither; /** * @category error handling * @since 2.16.6 */ export declare const orLeftW: (onLeft: (e: E1) => Reader) => (fa: ReaderEither) => ReaderEither; /** * @since 2.0.0 */ export declare const swap: (ma: ReaderEither) => ReaderEither; /** * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types * use the type constructor `F` to represent some computational context. * * @category mapping * @since 2.0.0 */ export declare const map: (f: (a: A) => B) => (fa: ReaderEither) => ReaderEither; /** * Returns a `ReaderEither` whose failure and success channels have been mapped by the specified pair of functions, `f` and `g`. * * @example * import * as ReaderEither from 'fp-ts/ReaderEither' * import * as Either from 'fp-ts/Either' * * const f = (s: string) => new Error(s) * const g = (n: number) => n * 2 * * assert.deepStrictEqual(ReaderEither.mapBoth(ReaderEither.right(1), f, g)({}), Either.right(2)) * assert.deepStrictEqual(ReaderEither.mapBoth(ReaderEither.left('err'), f, g)({}), Either.left(new Error('err'))) * * @category error handling * @since 2.16.0 */ export declare const mapBoth: { (f: (e: E) => G, g: (a: A) => B): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (e: E) => G, g: (a: A) => B): ReaderEither; }; /** * Alias of `mapBoth`. * * @category legacy * @since 2.0.0 */ export declare const bimap: (f: (e: E) => G, g: (a: A) => B) => (fa: ReaderEither) => ReaderEither; /** * Returns a `ReaderEither` with its error channel mapped using the specified function. * * @example * import * as ReaderEither from 'fp-ts/ReaderEither' * import * as Either from 'fp-ts/Either' * * const f = (s: string) => new Error(s) * * assert.deepStrictEqual(ReaderEither.mapError(ReaderEither.right(1), f)({}), Either.right(1)) * assert.deepStrictEqual(ReaderEither.mapError(ReaderEither.left('err'), f)({}), Either.left(new Error('err'))) * * @category error handling * @since 2.16.0 */ export declare const mapError: { (f: (e: E) => G): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (e: E) => G): ReaderEither; }; /** * Alias of `mapError`. * * @category legacy * @since 2.0.0 */ export declare const mapLeft: (f: (e: E) => G) => (fa: ReaderEither) => ReaderEither; /** * @since 2.0.0 */ export declare const ap: (fa: ReaderEither) => (fab: ReaderEither B>) => ReaderEither; /** * Less strict version of [`ap`](#ap). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @since 2.8.0 */ export declare const apW: (fa: ReaderEither) => (fab: ReaderEither B>) => ReaderEither; /** * @category constructors * @since 2.8.5 */ export declare const of: (a: A) => ReaderEither; /** * @category sequencing * @since 2.14.0 */ export declare const flatMap: { (f: (a: A) => ReaderEither): (ma: ReaderEither) => ReaderEither; (ma: ReaderEither, f: (a: A) => ReaderEither): ReaderEither; }; /** * Less strict version of [`flatten`](#flatten). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.11.0 */ export declare const flattenW: (mma: ReaderEither>) => ReaderEither; /** * @category sequencing * @since 2.0.0 */ export declare const flatten: (mma: ReaderEither>) => ReaderEither; /** * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to * types of kind `* -> *`. * * @category error handling * @since 2.0.0 */ export declare const alt: (that: () => ReaderEither) => (fa: ReaderEither) => ReaderEither; /** * Less strict version of [`alt`](#alt). * * The `W` suffix (short for **W**idening) means that the environment, the error and the return types will be merged. * * @category error handling * @since 2.9.0 */ export declare const altW: (that: () => ReaderEither) => (fa: ReaderEither) => ReaderEither; /** * @since 2.7.0 */ export declare const throwError: MonadThrow3['throwError']; /** * @category type lambdas * @since 2.0.0 */ export declare const URI = "ReaderEither"; /** * @category type lambdas * @since 2.0.0 */ export type URI = typeof URI; declare module './HKT.js' { interface URItoKind3 { readonly [URI]: ReaderEither; } } /** * @category filtering * @since 2.10.0 */ export declare const getCompactable: (M: Monoid) => Compactable3C; /** * @category filtering * @since 2.10.0 */ export declare function getFilterable(M: Monoid): Filterable3C; /** * The default [`Applicative`](#applicative) instance returns the first error, if you want to * get all errors you need to provide a way to concatenate them via a `Semigroup`. * * See [`getApplicativeValidation`](./Either.ts.html#getapplicativevalidation). * * @category error handling * @since 2.7.0 */ export declare function getApplicativeReaderValidation(S: Semigroup): Applicative3C; /** * The default [`Alt`](#alt) instance returns the last error, if you want to * get all errors you need to provide a way to concatenate them via a `Semigroup`. * * See [`getAltValidation`](./Either.ts.html#getaltvalidation). * * @category error handling * @since 2.7.0 */ export declare function getAltReaderValidation(S: Semigroup): Alt3C; /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor3; /** * Maps the `Right` value of this `ReaderEither` to the specified constant value. * * @category mapping * @since 2.16.0 */ export declare const as: { (a: A): (self: ReaderEither) => ReaderEither; (self: ReaderEither, a: A): ReaderEither; }; /** * Maps the `Right` value of this `ReaderEither` to the void constant value. * * @category mapping * @since 2.16.0 */ export declare const asUnit: (self: ReaderEither) => ReaderEither; /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: import("./HKT.js").Kind3<"ReaderEither", R, E, (a: A) => B>) => import("./HKT.js").Kind3<"ReaderEither", R, E, B>; /** * @category instances * @since 2.10.0 */ export declare const Pointed: Pointed3; /** * @category instances * @since 2.10.0 */ export declare const Apply: Apply3; /** * Combine two effectful actions, keeping only the result of the first. * * @since 2.0.0 */ export declare const apFirst: (second: ReaderEither) => (first: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, A>; /** * Less strict version of [`apFirst`](#apfirst) * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @since 2.12.0 */ export declare const apFirstW: (second: ReaderEither) => (first: ReaderEither) => ReaderEither; /** * Combine two effectful actions, keeping only the result of the second. * * @since 2.0.0 */ export declare const apSecond: (second: ReaderEither) => (first: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, B>; /** * Less strict version of [`apSecond`](#apsecond) * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @since 2.12.0 */ export declare const apSecondW: (second: ReaderEither) => (first: ReaderEither) => ReaderEither; /** * @category instances * @since 2.7.0 */ export declare const Applicative: Applicative3; /** * @category instances * @since 2.10.0 */ export declare const Chain: chainable.Chain3; /** * @category instances * @since 2.7.0 */ export declare const Monad: Monad3; /** * @category instances * @since 2.10.0 */ export declare const FromEither: FromEither3; /** * @category instances * @since 2.11.0 */ export declare const FromReader: FromReader3; /** * Composes computations in sequence, using the return value of one computation to determine the next computation and * keeping only the result of the first. * * @category combinators * @since 2.15.0 */ export declare const tap: { (self: ReaderEither, f: (a: A) => ReaderEither): ReaderEither; (f: (a: A) => ReaderEither): (self: ReaderEither) => ReaderEither; }; /** * Composes computations in sequence, using the return value of one computation to determine the next computation and * keeping only the result of the first. * * @example * import * as E from 'fp-ts/Either' * import { pipe } from 'fp-ts/function' * import * as RE from 'fp-ts/ReaderEither' * * const checkString = (value: string) => pipe( * RE.ask(), * RE.tapEither( * (minLength) => value.length > minLength * ? E.right('ok') * : E.left('error') * ) * ) * * assert.deepStrictEqual(checkString('')(1), E.left('error')) * assert.deepStrictEqual(checkString('fp-ts')(2), E.right(2)) * * @category combinators * @since 2.16.0 */ export declare const tapEither: { (f: (a: A) => Either): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (a: A) => Either): ReaderEither; }; /** * Composes computations in sequence, using the return value of one computation to determine the next computation and * keeping only the result of the first. * * @category combinators * @since 2.16.0 */ export declare const tapReader: { (f: (a: A) => Reader): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (a: A) => Reader): ReaderEither; }; /** * @category instances * @since 2.7.0 */ export declare const Bifunctor: Bifunctor3; /** * @category instances * @since 2.7.0 */ export declare const Alt: Alt3; /** * Reads the current context. * * @category constructors * @since 2.0.0 */ export declare const ask: () => ReaderEither; /** * Projects a value from the global context in a `ReaderEither`. * * @category constructors * @since 2.0.0 */ export declare const asks: (f: (r: R) => A) => ReaderEither; /** * @category lifting * @since 2.11.0 */ export declare const fromReaderK: , R, B>(f: (...a: A) => Reader) => (...a: A) => ReaderEither; /** * Alias of `tapReader`. * * @category legacy * @since 2.11.0 */ export declare const chainFirstReaderK: (f: (a: A) => Reader) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tapReader`. * * Less strict version of [`chainReaderK`](#chainreaderk). * * The `W` suffix (short for **W**idening) means that the environment types will be merged. * * @category legacy * @since 2.11.0 */ export declare const chainFirstReaderKW: (f: (a: A) => Reader) => (ma: ReaderEither) => ReaderEither; /** * @category instances * @since 2.7.0 */ export declare const MonadThrow: MonadThrow3; /** * @category conversions * @since 2.0.0 */ export declare const fromOption: (onNone: LazyArg) => (fa: Option) => ReaderEither; /** * Use `liftOption`. * * @category legacy * @since 2.10.0 */ export declare const fromOptionK: (onNone: LazyArg) => , B>(f: (...a: A) => Option) => (...a: A) => ReaderEither; /** * Use `flatMapOption`. * * @category legacy * @since 2.10.0 */ export declare const chainOptionK: (onNone: LazyArg) => (f: (a: A) => Option) => (ma: ReaderEither) => ReaderEither; /** * Use `flatMapOption`. * * @category legacy * @since 2.13.2 */ export declare const chainOptionKW: (onNone: LazyArg) => (f: (a: A) => Option) => (ma: ReaderEither) => ReaderEither; /** * @category lifting * @since 2.15.0 */ export declare const liftNullable: , B, E>(f: (...a: A) => B | null | undefined, onNullable: (...a: A) => E) => (...a: A) => ReaderEither>; /** * @category lifting * @since 2.15.0 */ export declare const liftOption: , B, E>(f: (...a: A) => Option, onNone: (...a: A) => E) => (...a: A) => ReaderEither; /** * @category sequencing * @since 2.15.0 */ export declare const flatMapNullable: { (f: (a: A) => B | null | undefined, onNullable: (a: A) => E2): (self: ReaderEither) => ReaderEither>; (self: ReaderEither, f: (a: A) => B | null | undefined, onNullable: (a: A) => E2): ReaderEither>; }; /** * @category sequencing * @since 2.15.0 */ export declare const flatMapOption: { (f: (a: A) => Option, onNone: (a: A) => E2): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (a: A) => Option, onNone: (a: A) => E2): ReaderEither; }; /** * @category sequencing * @since 2.15.0 */ export declare const flatMapEither: { (f: (a: A) => E.Either): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (a: A) => E.Either): ReaderEither; }; /** * @category sequencing * @since 2.16.0 */ export declare const flatMapReader: { (f: (a: A) => Reader): (self: ReaderEither) => ReaderEither; (self: ReaderEither, f: (a: A) => Reader): ReaderEither; }; /** * Alias of `flatMapEither`. * * @category legacy * @since 2.4.0 */ export declare const chainEitherK: (f: (a: A) => E.Either) => (ma: ReaderEither) => ReaderEither; /** * Alias of `flatMapEither`. * * @category legacy * @since 2.6.1 */ export declare const chainEitherKW: (f: (a: A) => Either) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tapEither`. * * @category legacy * @since 2.12.0 */ export declare const chainFirstEitherK: (f: (a: A) => E.Either) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tapEither`. * * Less strict version of [`chainFirstEitherK`](#chainfirsteitherk). * * The `W` suffix (short for **W**idening) means that the environment types will be merged. * * @category legacy * @since 2.12.0 */ export declare const chainFirstEitherKW: (f: (a: A) => Either) => (ma: ReaderEither) => ReaderEither; /** * Alias of `flatMapReader`. * * @category legacy * @since 2.11.0 */ export declare const chainReaderK: (f: (a: A) => Reader) => (ma: ReaderEither) => ReaderEither; /** * Alias of `flatMapReader`. * * Less strict version of [`chainReaderK`](#chainreaderk). * * The `W` suffix (short for **W**idening) means that the environment types will be merged. * * @category legacy * @since 2.11.0 */ export declare const chainReaderKW: (f: (a: A) => Reader) => (ma: ReaderEither) => ReaderEither; /** * @category lifting * @since 2.0.0 */ export declare const fromPredicate: { (refinement: Refinement, onFalse: (a: A) => E): (a: A) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E): (b: B) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E): (a: A) => ReaderEither; }; /** * @category filtering * @since 2.0.0 */ export declare const filterOrElse: { (refinement: Refinement, onFalse: (a: A) => E): (ma: ReaderEither) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E): (mb: ReaderEither) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E): (ma: ReaderEither) => ReaderEither; }; /** * Less strict version of [`filterOrElse`](#filterorelse). * * The `W` suffix (short for **W**idening) means that the error types will be merged. * * @category filtering * @since 2.9.0 */ export declare const filterOrElseW: { (refinement: Refinement, onFalse: (a: A) => E2): (ma: ReaderEither) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E2): (mb: ReaderEither) => ReaderEither; (predicate: Predicate, onFalse: (a: A) => E2): (ma: ReaderEither) => ReaderEither; }; /** * @category lifting * @since 2.4.0 */ export declare const fromEitherK: , B>(f: (...a: A) => E.Either) => (...a: A) => ReaderEither; /** * @category do notation * @since 2.9.0 */ export declare const Do: ReaderEither; /** * @category do notation * @since 2.8.0 */ export declare const bindTo: (name: N) => (fa: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, { readonly [K in N]: A; }>; declare const let_: (name: Exclude, f: (a: A) => B) => (fa: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>; export { /** * @category do notation * @since 2.13.0 */ let_ as let }; /** * @category do notation * @since 2.8.0 */ export declare const bind: (name: Exclude, f: (a: A) => import("./HKT.js").Kind3<"ReaderEither", R, E, B>) => (ma: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>; /** * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category do notation * @since 2.8.0 */ export declare const bindW: (name: Exclude, f: (a: A) => ReaderEither) => (fa: ReaderEither) => ReaderEither; /** * @category do notation * @since 2.8.0 */ export declare const apS: (name: Exclude, fb: ReaderEither) => (fa: import("./HKT.js").Kind3<"ReaderEither", R, E, A>) => import("./HKT.js").Kind3<"ReaderEither", R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>; /** * Less strict version of [`apS`](#aps). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category do notation * @since 2.8.0 */ export declare const apSW: (name: Exclude, fb: ReaderEither) => (fa: ReaderEither) => ReaderEither; /** * @since 2.11.0 */ export declare const ApT: ReaderEither; /** * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(Applicative)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyNonEmptyArrayWithIndex: (f: (index: number, a: A) => ReaderEither) => ((as: ReadonlyNonEmptyArray) => ReaderEither>); /** * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyArrayWithIndex: (f: (index: number, a: A) => ReaderEither) => ((as: ReadonlyArray) => ReaderEither>); /** * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const traverseArrayWithIndex: (f: (index: number, a: A) => ReaderEither) => (as: ReadonlyArray) => ReaderEither>; /** * Equivalent to `ReadonlyArray#traverse(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const traverseArray: (f: (a: A) => ReaderEither) => ((as: ReadonlyArray) => ReaderEither>); /** * Equivalent to `ReadonlyArray#sequence(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const sequenceArray: (arr: ReadonlyArray>) => ReaderEither>; /** * Alias of `flatMap`. * * @category legacy * @since 2.0.0 */ export declare const chain: (f: (a: A) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Alias of `flatMap`. * * @category legacy * @since 2.6.0 */ export declare const chainW: (f: (a: A) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tap`. * * @category legacy * @since 2.0.0 */ export declare const chainFirst: (f: (a: A) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tap`. * * @category legacy * @since 2.8.0 */ export declare const chainFirstW: (f: (a: A) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tapError`. * * @category legacy * @since 2.11.0 */ export declare const orElseFirst: (onLeft: (e: E) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * Alias of `tapError`. * * @category legacy * @since 2.11.0 */ export declare const orElseFirstW: (onLeft: (e: E1) => ReaderEither) => (ma: ReaderEither) => ReaderEither; /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Functor` instance, pass `RE.Functor` instead of `RE.readerEither` * (where `R` is from `import R from 'fp-ts/ReaderEither'`) * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const readerEither: Monad3 & Bifunctor3 & Alt3 & MonadThrow3; /** * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const getApplySemigroup: (S: Semigroup) => Semigroup>; /** * Use [`getApplicativeMonoid`](./Applicative.ts.html#getapplicativemonoid) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const getApplyMonoid: (M: Monoid) => Monoid>; /** * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const getSemigroup: (S: Semigroup) => Semigroup>; /** * Use [`getApplicativeReaderValidation`](#getapplicativereadervalidation) and [`getAltReaderValidation`](#getaltreadervalidation) instead. * * @category zone of death * @since 2.3.0 * @deprecated */ export declare function getReaderValidation(SE: Semigroup): Monad3C & Bifunctor3 & Alt3C & MonadThrow3C;