/** * @since 2.0.0 */ import { Alt3, Alt3C } from './Alt' import { Applicative3, Applicative3C } from './Applicative' import { Apply1, Apply3 } from './Apply' import { Bifunctor3 } from './Bifunctor' import { Chain3 } from './Chain' import { Compactable3C } from './Compactable' import * as E from './Either' import { Filterable3C } from './Filterable' import { FromEither3 } from './FromEither' import { FromIO3 } from './FromIO' import { FromReader3 } from './FromReader' import { FromTask3 } from './FromTask' import { Lazy } from './function' import { Functor3 } from './Functor' import { IO } from './IO' import { IOEither } from './IOEither' import { Monad3, Monad3C } from './Monad' import { MonadIO3 } from './MonadIO' import { MonadTask3, MonadTask3C } from './MonadTask' import { MonadThrow3, MonadThrow3C } from './MonadThrow' import { Monoid } from './Monoid' import { Option } from './Option' import { Pointed3 } from './Pointed' import { Predicate } from './Predicate' import * as R from './Reader' import { ReaderEither } from './ReaderEither' import * as RIO from './ReaderIO' import * as RT from './ReaderTask' import { ReadonlyNonEmptyArray } from './ReadonlyNonEmptyArray' import { Refinement } from './Refinement' import { Semigroup } from './Semigroup' import * as T from './Task' import * as TE from './TaskEither' import Either = E.Either import Task = T.Task import TaskEither = TE.TaskEither import Reader = R.Reader import ReaderIO = RIO.ReaderIO import ReaderTask = RT.ReaderTask /** * @category model * @since 2.0.0 */ export interface ReaderTaskEither { (r: R): TaskEither } /** * @category conversions * @since 2.0.0 */ export declare const fromTaskEither: (fa: TaskEither) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const left: (e: E) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const right: (a: A) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const rightTask: (ma: Task) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const leftTask: (me: Task) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const rightReader: (ma: Reader) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const leftReader: (me: Reader) => ReaderTaskEither /** * @category constructors * @since 2.5.0 */ export declare const rightReaderTask: (ma: ReaderTask) => ReaderTaskEither /** * @category constructors * @since 2.5.0 */ export declare const leftReaderTask: (me: ReaderTask) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const rightIO: (ma: IO) => ReaderTaskEither /** * @category constructors * @since 2.0.0 */ export declare const leftIO: (me: IO) => ReaderTaskEither /** * @category constructors * @since 2.13.0 */ export declare const rightReaderIO: (ma: ReaderIO) => ReaderTaskEither /** * @category constructors * @since 2.13.0 */ export declare const leftReaderIO: (me: ReaderIO) => ReaderTaskEither /** * @category conversions * @since 2.0.0 */ export declare const fromEither: (fa: Either) => ReaderTaskEither /** * @category conversions * @since 2.11.0 */ export declare const fromReader: (fa: Reader) => ReaderTaskEither /** * @category conversions * @since 2.0.0 */ export declare const fromIO: (fa: IO) => ReaderTaskEither /** * @category conversions * @since 2.0.0 */ export declare const fromTask: (fa: Task) => ReaderTaskEither /** * @category conversions * @since 2.0.0 */ export declare const fromIOEither: (fa: IOEither) => ReaderTaskEither /** * @category conversions * @since 2.0.0 */ export declare const fromReaderEither: (fa: ReaderEither) => ReaderTaskEither /** * @category pattern matching * @since 2.10.0 */ export declare const match: ( onLeft: (e: E) => B, onRight: (a: A) => B ) => (ma: ReaderTaskEither) => ReaderTask /** * 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: ReaderTaskEither) => ReaderTask /** * The `E` suffix (short for **E**ffect) means that the handlers return an effect (`ReaderTask`). * * @category pattern matching * @since 2.10.0 */ export declare const matchE: ( onLeft: (e: E) => ReaderTask, onRight: (a: A) => ReaderTask ) => (ma: ReaderTaskEither) => ReaderTask /** * Alias of [`matchE`](#matche). * * @category pattern matching * @since 2.0.0 */ export declare const fold: ( onLeft: (e: E) => RT.ReaderTask, onRight: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => RT.ReaderTask /** * 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) => ReaderTask, onRight: (a: A) => ReaderTask ) => (ma: ReaderTaskEither) => ReaderTask /** * Alias of [`matchEW`](#matchew). * * @category pattern matching * @since 2.10.0 */ export declare const foldW: ( onLeft: (e: E) => RT.ReaderTask, onRight: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => RT.ReaderTask /** * @category error handling * @since 2.0.0 */ export declare const getOrElse: ( onLeft: (e: E) => ReaderTask ) => (ma: ReaderTaskEither) => ReaderTask /** * 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) => ReaderTask ) => (ma: ReaderTaskEither) => ReaderTask /** * @category conversions * @since 2.10.0 */ export declare const toUnion: (fa: ReaderTaskEither) => ReaderTask /** * @category conversions * @since 2.12.0 */ export declare const fromNullable: (e: E) => (a: A) => ReaderTaskEither> /** * @category lifting * @since 2.12.0 */ export declare const fromNullableK: ( e: E ) => , B>( f: (...a: A) => B | null | undefined ) => (...a: A) => ReaderTaskEither> /** * @category sequencing * @since 2.12.0 */ export declare const chainNullableK: ( e: E ) => ( f: (a: A) => B | null | undefined ) => (ma: ReaderTaskEither) => ReaderTaskEither> /** * 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: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`asksReaderTaskEither`](#asksreadertaskeither). * * The `W` suffix (short for **W**idening) means that the environment types will be merged. * * @category constructors * @since 2.11.0 */ export declare const asksReaderTaskEitherW: ( f: (r1: R1) => ReaderTaskEither ) => ReaderTaskEither /** * Effectfully accesses the environment. * * @category constructors * @since 2.11.0 */ export declare const asksReaderTaskEither: ( f: (r: R) => ReaderTaskEither ) => ReaderTaskEither /** * @category error handling * @since 2.0.0 */ export declare const orElse: ( onLeft: (e: E1) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * 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) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category error handling * @since 2.11.0 */ export declare const orElseFirst: ( onLeft: (e: E) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * The `W` suffix (short for **W**idening) means that the environment types and the return types will be merged. * * @category error handling * @since 2.11.0 */ export declare const orElseFirstW: ( onLeft: (e: E1) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category error handling * @since 2.11.0 */ export declare const orLeft: ( onLeft: (e: E1) => ReaderTask ) => (fa: ReaderTaskEither) => ReaderTaskEither /** * @since 2.0.0 */ export declare const swap: (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.4.0 */ export declare const fromIOEitherK: ( f: (...a: A) => IOEither ) => (...a: A) => ReaderTaskEither /** * Less strict version of [`chainIOEitherK`](#chainioeitherk). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.6.1 */ export declare const chainIOEitherKW: ( f: (a: A) => IOEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.4.0 */ export declare const chainIOEitherK: ( f: (a: A) => IOEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.4.0 */ export declare const fromTaskEitherK: ( f: (...a: A) => TE.TaskEither ) => (...a: A) => ReaderTaskEither /** * Less strict version of [`chainTaskEitherK`](#chaintaskeitherk). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.6.1 */ export declare const chainTaskEitherKW: ( f: (a: A) => TaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.4.0 */ export declare const chainTaskEitherK: ( f: (a: A) => TaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstTaskEitherK`](#chainfirsttaskeitherk). * * 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 chainFirstTaskEitherKW: ( f: (a: A) => TaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainFirstTaskEitherK: ( f: (a: A) => TaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.11.0 */ export declare const fromReaderEitherK: ( f: (...a: A) => ReaderEither ) => (...a: A) => ReaderTaskEither /** * Less strict version of [`chainReaderEitherK`](#chainreadereitherk). * * 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 chainReaderEitherKW: ( f: (a: A) => ReaderEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainReaderEitherK: ( f: (a: A) => ReaderEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstReaderEitherK`](#chainfirstreadereitherk). * * 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 chainFirstReaderEitherKW: ( f: (a: A) => ReaderEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainFirstReaderEitherK: ( f: (a: A) => ReaderEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * `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: ReaderTaskEither) => ReaderTaskEither /** * Map a pair of functions over the two last type arguments of the bifunctor. * * @category mapping * @since 2.0.0 */ export declare const bimap: ( f: (e: E) => G, g: (a: A) => B ) => (fa: ReaderTaskEither) => ReaderTaskEither /** * Map a function over the second type argument of a bifunctor. * * @category error handling * @since 2.0.0 */ export declare const mapLeft: ( f: (e: E) => G ) => (fa: ReaderTaskEither) => ReaderTaskEither /** * @since 2.0.0 */ export declare const ap: ( fa: ReaderTaskEither ) => (fab: ReaderTaskEither B>) => ReaderTaskEither /** * 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: ReaderTaskEither ) => (fab: ReaderTaskEither B>) => ReaderTaskEither /** * @category constructors * @since 2.7.0 */ export declare const of: (a: A) => ReaderTaskEither /** * Composes computations in sequence, using the return value of one computation to determine the next computation. * * @category sequencing * @since 2.0.0 */ export declare const chain: ( f: (a: A) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chain`](#chain). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.6.0 */ export declare const chainW: ( f: (a: A) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * 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: ReaderTaskEither> ) => ReaderTaskEither /** * @category sequencing * @since 2.0.0 */ export declare const flatten: ( mma: ReaderTaskEither> ) => ReaderTaskEither /** * 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: () => ReaderTaskEither ) => (fa: ReaderTaskEither) => ReaderTaskEither /** * 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: () => ReaderTaskEither ) => (fa: ReaderTaskEither) => ReaderTaskEither /** * @since 2.0.0 */ export declare const throwError: MonadThrow3['throwError'] /** * @category type lambdas * @since 2.0.0 */ export declare const URI = 'ReaderTaskEither' /** * @category type lambdas * @since 2.0.0 */ export declare type URI = typeof URI declare module './HKT' { interface URItoKind3 { readonly [URI]: ReaderTaskEither } } /** * @category filtering * @since 2.10.0 */ export declare const getCompactable: (M: Monoid) => Compactable3C<'ReaderTaskEither', E> /** * @category filtering * @since 2.10.0 */ export declare function getFilterable(M: Monoid): Filterable3C /** * The default [`ApplicativePar`](#applicativepar) 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 getApplicativeReaderTaskValidation(A: Apply1, 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 getAltReaderTaskValidation(S: Semigroup): Alt3C /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor3 /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: ReaderTaskEither B>) => ReaderTaskEither /** * @category instances * @since 2.10.0 */ export declare const Pointed: Pointed3 /** * Runs computations in parallel. * * @category instances * @since 2.10.0 */ export declare const ApplyPar: Apply3 /** * Combine two effectful actions, keeping only the result of the first. * * @since 2.0.0 */ export declare const apFirst: ( second: ReaderTaskEither ) => (first: ReaderTaskEither) => ReaderTaskEither /** * 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: ReaderTaskEither ) => (first: ReaderTaskEither) => ReaderTaskEither /** * Combine two effectful actions, keeping only the result of the second. * * @since 2.0.0 */ export declare const apSecond: ( second: ReaderTaskEither ) => (first: ReaderTaskEither) => ReaderTaskEither /** * 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: ReaderTaskEither ) => (first: ReaderTaskEither) => ReaderTaskEither /** * Runs computations in parallel. * * @category instances * @since 2.7.0 */ export declare const ApplicativePar: Applicative3 /** * Runs computations sequentially. * * @category instances * @since 2.10.0 */ export declare const ApplySeq: Apply3 /** * Runs computations sequentially. * * @category instances * @since 2.7.0 */ export declare const ApplicativeSeq: Applicative3 /** * @category instances * @since 2.10.0 */ export declare const Chain: Chain3 /** * @category instances * @since 2.10.0 */ export declare const Monad: Monad3 /** * @category instances * @since 2.10.0 */ export declare const MonadIO: MonadIO3 /** * @category instances * @since 2.10.0 */ export declare const MonadTask: MonadTask3 /** * @category instances * @since 2.10.0 */ export declare const MonadThrow: MonadThrow3 /** * 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 sequencing * @since 2.0.0 */ export declare const chainFirst: ( f: (a: A) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirst`](#chainfirst). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.8.0 */ export declare const chainFirstW: ( f: (a: A) => ReaderTaskEither ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category instances * @since 2.7.0 */ export declare const Bifunctor: Bifunctor3 /** * @category instances * @since 2.7.0 */ export declare const Alt: Alt3 /** * @category instances * @since 2.11.0 */ export declare const FromReader: FromReader3 /** * Reads the current context. * * @category constructors * @since 2.0.0 */ export declare const ask: () => ReaderTaskEither /** * Projects a value from the global context in a `ReaderEither`. * * @category constructors * @since 2.0.0 */ export declare const asks: (f: (r: R) => A) => ReaderTaskEither /** * @category lifting * @since 2.11.0 */ export declare const fromReaderK: , R, B>( f: (...a: A) => Reader ) => (...a: A) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainReaderK: ( f: (a: A) => Reader ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainReaderK`](#chainreaderk). * * 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 chainReaderKW: ( f: (a: A) => R.Reader ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainFirstReaderK: ( f: (a: A) => R.Reader ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstReaderK`](#chainfirstreaderk). * * 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 chainFirstReaderKW: ( f: (a: A) => R.Reader ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.11.0 */ export declare const fromReaderTaskK: ( f: (...a: A) => RT.ReaderTask ) => (...a: A) => ReaderTaskEither /** * Less strict version of [`chainReaderTaskK`](#chainreadertaskk). * * 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 chainReaderTaskKW: ( f: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainReaderTaskK: ( f: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstReaderTaskK`](#chainfirstreadertaskk). * * 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 chainFirstReaderTaskKW: ( f: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.11.0 */ export declare const chainFirstReaderTaskK: ( f: (a: A) => RT.ReaderTask ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.13.0 */ export declare const fromReaderIOK: ( f: (...a: A) => RIO.ReaderIO ) => (...a: A) => ReaderTaskEither /** * Less strict version of [`chainReaderIOK`](#chainreaderiok). * * @category sequencing * @since 2.13.0 */ export declare const chainReaderIOKW: ( f: (a: A) => ReaderIO ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.13.0 */ export declare const chainReaderIOK: ( f: (a: A) => ReaderIO ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstReaderIOK`](#chainfirstreaderiok). * * @category sequencing * @since 2.13.0 */ export declare const chainFirstReaderIOKW: ( f: (a: A) => ReaderIO ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.13.0 */ export declare const chainFirstReaderIOK: ( f: (a: A) => ReaderIO ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category instances * @since 2.10.0 */ export declare const FromEither: FromEither3 /** * @category conversions * @since 2.0.0 */ export declare const fromOption: (onNone: Lazy) => (fa: Option) => ReaderTaskEither /** * @category lifting * @since 2.10.0 */ export declare const fromOptionK: ( onNone: Lazy ) => , B>( f: (...a: A) => Option ) => (...a: A) => ReaderTaskEither /** * @category sequencing * @since 2.10.0 */ export declare const chainOptionK: ( onNone: Lazy ) => (f: (a: A) => Option) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.4.0 */ export declare const chainEitherK: ( f: (a: A) => E.Either ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainEitherK`](#chaineitherk). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.6.1 */ export declare const chainEitherKW: ( f: (a: A) => Either ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.12.0 */ export declare const chainFirstEitherK: ( f: (a: A) => E.Either ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * Less strict version of [`chainFirstEitherK`](#chainfirsteitherk). * * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. * * @category sequencing * @since 2.12.0 */ export declare const chainFirstEitherKW: ( f: (a: A) => Either ) => (ma: ReaderTaskEither) => ReaderTaskEither /** * @category lifting * @since 2.0.0 */ export declare const fromPredicate: { (refinement: Refinement, onFalse: (a: A) => E): ( a: A ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E): ( b: B ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E): (a: A) => ReaderTaskEither } /** * @category filtering * @since 2.0.0 */ export declare const filterOrElse: { (refinement: Refinement, onFalse: (a: A) => E): ( ma: ReaderTaskEither ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E): ( mb: ReaderTaskEither ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E): (ma: ReaderTaskEither) => ReaderTaskEither } /** * 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: ReaderTaskEither ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E2): ( mb: ReaderTaskEither ) => ReaderTaskEither (predicate: Predicate, onFalse: (a: A) => E2): ( ma: ReaderTaskEither ) => ReaderTaskEither } /** * @category lifting * @since 2.4.0 */ export declare const fromEitherK: , B>( f: (...a: A) => E.Either ) => (...a: A) => ReaderTaskEither /** * @category instances * @since 2.10.0 */ export declare const FromIO: FromIO3 /** * @category lifting * @since 2.10.0 */ export declare const fromIOK: , B>( f: (...a: A) => IO ) => (...a: A) => ReaderTaskEither /** * @category sequencing * @since 2.10.0 */ export declare const chainIOK: ( f: (a: A) => IO ) => (first: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.10.0 */ export declare const chainFirstIOK: ( f: (a: A) => IO ) => (first: ReaderTaskEither) => ReaderTaskEither /** * @category instances * @since 2.10.0 */ export declare const FromTask: FromTask3 /** * @category lifting * @since 2.10.0 */ export declare const fromTaskK: , B>( f: (...a: A) => T.Task ) => (...a: A) => ReaderTaskEither /** * @category sequencing * @since 2.10.0 */ export declare const chainTaskK: ( f: (a: A) => T.Task ) => (first: ReaderTaskEither) => ReaderTaskEither /** * @category sequencing * @since 2.10.0 */ export declare const chainFirstTaskK: ( f: (a: A) => T.Task ) => (first: ReaderTaskEither) => ReaderTaskEither /** * Make sure that a resource is cleaned up in the event of an exception (\*). The release action is called regardless of * whether the body action throws (\*) or returns. * * (\*) i.e. returns a `Left` * * @since 2.0.4 */ export declare function bracket( acquire: ReaderTaskEither, use: (a: A) => ReaderTaskEither, release: (a: A, e: Either) => ReaderTaskEither ): ReaderTaskEither /** * Less strict version of [`bracket`](#bracket). * * @since 2.12.0 */ export declare function bracketW( acquire: ReaderTaskEither, use: (a: A) => ReaderTaskEither, release: (a: A, e: Either) => ReaderTaskEither ): ReaderTaskEither /** * @category do notation * @since 2.9.0 */ export declare const Do: ReaderTaskEither /** * @category do notation * @since 2.8.0 */ export declare const bindTo: ( name: N ) => (fa: ReaderTaskEither) => ReaderTaskEither declare const let_: ( name: Exclude, f: (a: A) => B ) => ( fa: ReaderTaskEither ) => ReaderTaskEither 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) => ReaderTaskEither ) => ( ma: ReaderTaskEither ) => ReaderTaskEither /** * 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) => ReaderTaskEither ) => ( fa: ReaderTaskEither ) => ReaderTaskEither< R1 & R2, E1 | E2, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } > /** * @category do notation * @since 2.8.0 */ export declare const apS: ( name: Exclude, fb: ReaderTaskEither ) => ( fa: ReaderTaskEither ) => ReaderTaskEither /** * 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: ReaderTaskEither ) => ( fa: ReaderTaskEither ) => ReaderTaskEither< R1 & R2, E1 | E2, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } > /** * @since 2.11.0 */ export declare const ApT: ReaderTaskEither /** * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativePar)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyNonEmptyArrayWithIndex: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: ReadonlyNonEmptyArray) => ReaderTaskEither> /** * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativePar)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyArrayWithIndex: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: readonly A[]) => ReaderTaskEither /** * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyNonEmptyArrayWithIndexSeq: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: ReadonlyNonEmptyArray) => ReaderTaskEither> /** * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyArrayWithIndexSeq: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: readonly A[]) => ReaderTaskEither /** * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const traverseArrayWithIndex: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: ReadonlyArray) => ReaderTaskEither> /** * Equivalent to `ReadonlyArray#traverse(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const traverseArray: ( f: (a: A) => ReaderTaskEither ) => (as: readonly A[]) => ReaderTaskEither /** * Equivalent to `ReadonlyArray#sequence(Applicative)`. * * @category traversing * @since 2.9.0 */ export declare const sequenceArray: ( arr: ReadonlyArray> ) => ReaderTaskEither> /** * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`. * * @category traversing * @since 2.9.0 */ export declare const traverseSeqArrayWithIndex: ( f: (index: number, a: A) => ReaderTaskEither ) => (as: ReadonlyArray) => ReaderTaskEither> /** * Equivalent to `ReadonlyArray#traverse(ApplicativeSeq)`. * * @category traversing * @since 2.9.0 */ export declare const traverseSeqArray: ( f: (a: A) => ReaderTaskEither ) => (as: readonly A[]) => ReaderTaskEither /** * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. * * @category traversing * @since 2.9.0 */ export declare const sequenceSeqArray: ( arr: ReadonlyArray> ) => ReaderTaskEither> /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Functor` instance, pass `RTE.Functor` instead of `RTE.readerTaskEither` * (where `RTE` is from `import RTE from 'fp-ts/ReaderTaskEither'`) * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const readerTaskEither: Monad3 & Bifunctor3 & Alt3 & MonadTask3 & MonadThrow3 /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Functor` instance, pass `RTE.Functor` instead of `RTE.readerTaskEitherSeq` * (where `RTE` is from `import RTE from 'fp-ts/ReaderTaskEither'`) * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const readerTaskEitherSeq: typeof readerTaskEither /** * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead. * * Semigroup returning the left-most `Left` value. If both operands are `Right`s then the inner values * are concatenated using the provided `Semigroup` * * @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 [`getApplicativeReaderTaskValidation`](#getapplicativereadertaskvalidation) and [`getAltReaderTaskValidation`](#getaltreadertaskvalidation) instead. * * @category instances * @since 2.3.0 * @deprecated */ export declare function getReaderTaskValidation( SE: Semigroup ): Monad3C & Bifunctor3 & Alt3C & MonadTask3C & MonadThrow3C /** * @category zone of death * @since 2.0.0 * @deprecated */ export declare function run(ma: ReaderTaskEither, r: R): Promise>