|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301 |
- /**
- * @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, E, A> {
- (r: R): TaskEither<E, A>
- }
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromTaskEither: <E, A, R = unknown>(fa: TaskEither<E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const left: <R, E = never, A = never>(e: E) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const right: <R, E = never, A = never>(a: A) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const rightTask: <R, E = never, A = never>(ma: Task<A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const leftTask: <R, E = never, A = never>(me: Task<E>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const rightReader: <R, E = never, A = never>(ma: Reader<R, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const leftReader: <R, E = never, A = never>(me: Reader<R, E>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.5.0
- */
- export declare const rightReaderTask: <R, E = never, A = never>(ma: ReaderTask<R, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.5.0
- */
- export declare const leftReaderTask: <R, E = never, A = never>(me: ReaderTask<R, E>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const rightIO: <R, E = never, A = never>(ma: IO<A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.0.0
- */
- export declare const leftIO: <R, E = never, A = never>(me: IO<E>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.13.0
- */
- export declare const rightReaderIO: <R, E = never, A = never>(ma: ReaderIO<R, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category constructors
- * @since 2.13.0
- */
- export declare const leftReaderIO: <R, E = never, A = never>(me: ReaderIO<R, E>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromEither: <E, A, R = unknown>(fa: Either<E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.11.0
- */
- export declare const fromReader: <R, A, E = never>(fa: Reader<R, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromIO: <A, R = unknown, E = never>(fa: IO<A>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromTask: <A, R = unknown, E = never>(fa: Task<A>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromIOEither: <E, A, R = unknown>(fa: IOEither<E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromReaderEither: <R, E, A>(fa: ReaderEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category pattern matching
- * @since 2.10.0
- */
- export declare const match: <E, B, A>(
- onLeft: (e: E) => B,
- onRight: (a: A) => B
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, B>
- /**
- * 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: <E, B, A, C>(
- onLeft: (e: E) => B,
- onRight: (a: A) => C
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, B | C>
- /**
- * 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: <R, E, A, B>(
- onLeft: (e: E) => ReaderTask<R, B>,
- onRight: (a: A) => ReaderTask<R, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, B>
- /**
- * Alias of [`matchE`](#matche).
- *
- * @category pattern matching
- * @since 2.0.0
- */
- export declare const fold: <R, E, A, B>(
- onLeft: (e: E) => RT.ReaderTask<R, B>,
- onRight: (a: A) => RT.ReaderTask<R, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => RT.ReaderTask<R, B>
- /**
- * 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: <E, R2, B, A, R3, C>(
- onLeft: (e: E) => ReaderTask<R2, B>,
- onRight: (a: A) => ReaderTask<R3, C>
- ) => <R1>(ma: ReaderTaskEither<R1, E, A>) => ReaderTask<R1 & R2 & R3, B | C>
- /**
- * Alias of [`matchEW`](#matchew).
- *
- * @category pattern matching
- * @since 2.10.0
- */
- export declare const foldW: <E, R2, B, A, R3, C>(
- onLeft: (e: E) => RT.ReaderTask<R2, B>,
- onRight: (a: A) => RT.ReaderTask<R3, C>
- ) => <R1>(ma: ReaderTaskEither<R1, E, A>) => RT.ReaderTask<R1 & R2 & R3, B | C>
- /**
- * @category error handling
- * @since 2.0.0
- */
- export declare const getOrElse: <R, E, A>(
- onLeft: (e: E) => ReaderTask<R, A>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, A>
- /**
- * 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: <R2, E, B>(
- onLeft: (e: E) => ReaderTask<R2, B>
- ) => <R1, A>(ma: ReaderTaskEither<R1, E, A>) => ReaderTask<R1 & R2, A | B>
- /**
- * @category conversions
- * @since 2.10.0
- */
- export declare const toUnion: <R, E, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTask<R, E | A>
- /**
- * @category conversions
- * @since 2.12.0
- */
- export declare const fromNullable: <E>(e: E) => <R, A>(a: A) => ReaderTaskEither<R, E, NonNullable<A>>
- /**
- * @category lifting
- * @since 2.12.0
- */
- export declare const fromNullableK: <E>(
- e: E
- ) => <A extends ReadonlyArray<unknown>, B>(
- f: (...a: A) => B | null | undefined
- ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, NonNullable<B>>
- /**
- * @category sequencing
- * @since 2.12.0
- */
- export declare const chainNullableK: <E>(
- e: E
- ) => <A, B>(
- f: (a: A) => B | null | undefined
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, NonNullable<B>>
- /**
- * 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: <R2, R1>(
- f: (r2: R2) => R1
- ) => <E, A>(ma: ReaderTaskEither<R1, E, A>) => ReaderTaskEither<R2, E, A>
- /**
- * 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: <R1, R2, E, A>(
- f: (r1: R1) => ReaderTaskEither<R2, E, A>
- ) => ReaderTaskEither<R1 & R2, E, A>
- /**
- * Effectfully accesses the environment.
- *
- * @category constructors
- * @since 2.11.0
- */
- export declare const asksReaderTaskEither: <R, E, A>(
- f: (r: R) => ReaderTaskEither<R, E, A>
- ) => ReaderTaskEither<R, E, A>
- /**
- * @category error handling
- * @since 2.0.0
- */
- export declare const orElse: <R, E1, A, E2>(
- onLeft: (e: E1) => ReaderTaskEither<R, E2, A>
- ) => (ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E2, A>
- /**
- * 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: <E1, R1, E2, B>(
- onLeft: (e: E1) => ReaderTaskEither<R1, E2, B>
- ) => <R2, A>(ma: ReaderTaskEither<R2, E1, A>) => ReaderTaskEither<R1 & R2, E2, A | B>
- /**
- * @category error handling
- * @since 2.11.0
- */
- export declare const orElseFirst: <E, R, B>(
- onLeft: (e: E) => ReaderTaskEither<R, E, B>
- ) => <A>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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: <E1, R2, E2, B>(
- onLeft: (e: E1) => ReaderTaskEither<R2, E2, B>
- ) => <R1, A>(ma: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, A>
- /**
- * @category error handling
- * @since 2.11.0
- */
- export declare const orLeft: <E1, R, E2>(
- onLeft: (e: E1) => ReaderTask<R, E2>
- ) => <A>(fa: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E2, A>
- /**
- * @since 2.0.0
- */
- export declare const swap: <R, E, A>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, A, E>
- /**
- * @category lifting
- * @since 2.4.0
- */
- export declare const fromIOEitherK: <E, A extends readonly unknown[], B>(
- f: (...a: A) => IOEither<E, B>
- ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * 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: <E2, A, B>(
- f: (a: A) => IOEither<E2, B>
- ) => <R, E1>(ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E1 | E2, B>
- /**
- * @category sequencing
- * @since 2.4.0
- */
- export declare const chainIOEitherK: <E, A, B>(
- f: (a: A) => IOEither<E, B>
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * @category lifting
- * @since 2.4.0
- */
- export declare const fromTaskEitherK: <E, A extends readonly unknown[], B>(
- f: (...a: A) => TE.TaskEither<E, B>
- ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * 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: <E2, A, B>(
- f: (a: A) => TaskEither<E2, B>
- ) => <R, E1>(ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E1 | E2, B>
- /**
- * @category sequencing
- * @since 2.4.0
- */
- export declare const chainTaskEitherK: <E, A, B>(
- f: (a: A) => TaskEither<E, B>
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <E2, A, B>(
- f: (a: A) => TaskEither<E2, B>
- ) => <R, E1>(ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E1 | E2, A>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainFirstTaskEitherK: <E, A, B>(
- f: (a: A) => TaskEither<E, B>
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category lifting
- * @since 2.11.0
- */
- export declare const fromReaderEitherK: <R, E, A extends readonly unknown[], B>(
- f: (...a: A) => ReaderEither<R, E, B>
- ) => (...a: A) => ReaderTaskEither<R, E, B>
- /**
- * 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: <R2, E2, A, B>(
- f: (a: A) => ReaderEither<R2, E2, B>
- ) => <R1, E1>(ma: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, B>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainReaderEitherK: <R, E, A, B>(
- f: (a: A) => ReaderEither<R, E, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <R2, E2, A, B>(
- f: (a: A) => ReaderEither<R2, E2, B>
- ) => <R1, E1>(ma: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, A>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainFirstReaderEitherK: <R, E, A, B>(
- f: (a: A) => ReaderEither<R, E, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` 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: <A, B>(f: (a: A) => B) => <R, E>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * Map a pair of functions over the two last type arguments of the bifunctor.
- *
- * @category mapping
- * @since 2.0.0
- */
- export declare const bimap: <E, G, A, B>(
- f: (e: E) => G,
- g: (a: A) => B
- ) => <R>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, G, B>
- /**
- * Map a function over the second type argument of a bifunctor.
- *
- * @category error handling
- * @since 2.0.0
- */
- export declare const mapLeft: <E, G>(
- f: (e: E) => G
- ) => <R, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, G, A>
- /**
- * @since 2.0.0
- */
- export declare const ap: <R, E, A>(
- fa: ReaderTaskEither<R, E, A>
- ) => <B>(fab: ReaderTaskEither<R, E, (a: A) => B>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <R2, E2, A>(
- fa: ReaderTaskEither<R2, E2, A>
- ) => <R1, E1, B>(fab: ReaderTaskEither<R1, E1, (a: A) => B>) => ReaderTaskEither<R1 & R2, E1 | E2, B>
- /**
- * @category constructors
- * @since 2.7.0
- */
- export declare const of: <R = unknown, E = never, A = never>(a: A) => ReaderTaskEither<R, E, A>
- /**
- * 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: <R, E, A, B>(
- f: (a: A) => ReaderTaskEither<R, E, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <R2, E2, A, B>(
- f: (a: A) => ReaderTaskEither<R2, E2, B>
- ) => <R1, E1>(ma: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, B>
- /**
- * 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: <R1, E1, R2, E2, A>(
- mma: ReaderTaskEither<R1, E1, ReaderTaskEither<R2, E2, A>>
- ) => ReaderTaskEither<R1 & R2, E1 | E2, A>
- /**
- * @category sequencing
- * @since 2.0.0
- */
- export declare const flatten: <R, E, A>(
- mma: ReaderTaskEither<R, E, ReaderTaskEither<R, E, A>>
- ) => ReaderTaskEither<R, E, A>
- /**
- * 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: <R, E, A>(
- that: () => ReaderTaskEither<R, E, A>
- ) => (fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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: <R2, E2, B>(
- that: () => ReaderTaskEither<R2, E2, B>
- ) => <R1, E1, A>(fa: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E2, A | B>
- /**
- * @since 2.0.0
- */
- export declare const throwError: MonadThrow3<URI>['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<R, E, A> {
- readonly [URI]: ReaderTaskEither<R, E, A>
- }
- }
- /**
- * @category filtering
- * @since 2.10.0
- */
- export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<'ReaderTaskEither', E>
- /**
- * @category filtering
- * @since 2.10.0
- */
- export declare function getFilterable<E>(M: Monoid<E>): Filterable3C<URI, E>
- /**
- * 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<E>(A: Apply1<T.URI>, S: Semigroup<E>): Applicative3C<URI, E>
- /**
- * 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<E>(S: Semigroup<E>): Alt3C<URI, E>
- /**
- * @category instances
- * @since 2.7.0
- */
- export declare const Functor: Functor3<URI>
- /**
- * @category mapping
- * @since 2.10.0
- */
- export declare const flap: <A>(a: A) => <R, E, B>(fab: ReaderTaskEither<R, E, (a: A) => B>) => ReaderTaskEither<R, E, B>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const Pointed: Pointed3<URI>
- /**
- * Runs computations in parallel.
- *
- * @category instances
- * @since 2.10.0
- */
- export declare const ApplyPar: Apply3<URI>
- /**
- * Combine two effectful actions, keeping only the result of the first.
- *
- * @since 2.0.0
- */
- export declare const apFirst: <R, E, B>(
- second: ReaderTaskEither<R, E, B>
- ) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<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: <R2, E2, B>(
- second: ReaderTaskEither<R2, E2, B>
- ) => <R1, E1, A>(first: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, A>
- /**
- * Combine two effectful actions, keeping only the result of the second.
- *
- * @since 2.0.0
- */
- export declare const apSecond: <R, E, B>(
- second: ReaderTaskEither<R, E, B>
- ) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<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: <R2, E2, B>(
- second: ReaderTaskEither<R2, E2, B>
- ) => <R1, E1, A>(first: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, B>
- /**
- * Runs computations in parallel.
- *
- * @category instances
- * @since 2.7.0
- */
- export declare const ApplicativePar: Applicative3<URI>
- /**
- * Runs computations sequentially.
- *
- * @category instances
- * @since 2.10.0
- */
- export declare const ApplySeq: Apply3<URI>
- /**
- * Runs computations sequentially.
- *
- * @category instances
- * @since 2.7.0
- */
- export declare const ApplicativeSeq: Applicative3<URI>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const Chain: Chain3<URI>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const Monad: Monad3<URI>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const MonadIO: MonadIO3<URI>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const MonadTask: MonadTask3<URI>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const MonadThrow: MonadThrow3<URI>
- /**
- * 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: <R, E, A, B>(
- f: (a: A) => ReaderTaskEither<R, E, B>
- ) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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: <R2, E2, A, B>(
- f: (a: A) => ReaderTaskEither<R2, E2, B>
- ) => <R1, E1>(ma: ReaderTaskEither<R1, E1, A>) => ReaderTaskEither<R1 & R2, E1 | E2, A>
- /**
- * @category instances
- * @since 2.7.0
- */
- export declare const Bifunctor: Bifunctor3<URI>
- /**
- * @category instances
- * @since 2.7.0
- */
- export declare const Alt: Alt3<URI>
- /**
- * @category instances
- * @since 2.11.0
- */
- export declare const FromReader: FromReader3<URI>
- /**
- * Reads the current context.
- *
- * @category constructors
- * @since 2.0.0
- */
- export declare const ask: <R, E = never>() => ReaderTaskEither<R, E, R>
- /**
- * Projects a value from the global context in a `ReaderEither`.
- *
- * @category constructors
- * @since 2.0.0
- */
- export declare const asks: <R, A, E = never>(f: (r: R) => A) => ReaderTaskEither<R, E, A>
- /**
- * @category lifting
- * @since 2.11.0
- */
- export declare const fromReaderK: <A extends ReadonlyArray<unknown>, R, B>(
- f: (...a: A) => Reader<R, B>
- ) => <E = never>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainReaderK: <A, R, B>(
- f: (a: A) => Reader<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <A, R1, B>(
- f: (a: A) => R.Reader<R1, B>
- ) => <R2, E>(ma: ReaderTaskEither<R2, E, A>) => ReaderTaskEither<R1 & R2, E, B>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainFirstReaderK: <A, R, B>(
- f: (a: A) => R.Reader<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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: <A, R1, B>(
- f: (a: A) => R.Reader<R1, B>
- ) => <R2, E>(ma: ReaderTaskEither<R2, E, A>) => ReaderTaskEither<R1 & R2, E, A>
- /**
- * @category lifting
- * @since 2.11.0
- */
- export declare const fromReaderTaskK: <A extends readonly unknown[], R, B>(
- f: (...a: A) => RT.ReaderTask<R, B>
- ) => <E = never>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * 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: <A, R2, B>(
- f: (a: A) => RT.ReaderTask<R2, B>
- ) => <R1, E>(ma: ReaderTaskEither<R1, E, A>) => ReaderTaskEither<R1 & R2, E, B>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainReaderTaskK: <A, R, B>(
- f: (a: A) => RT.ReaderTask<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <A, R2, B>(
- f: (a: A) => RT.ReaderTask<R2, B>
- ) => <R1, E>(ma: ReaderTaskEither<R1, E, A>) => ReaderTaskEither<R1 & R2, E, A>
- /**
- * @category sequencing
- * @since 2.11.0
- */
- export declare const chainFirstReaderTaskK: <A, R, B>(
- f: (a: A) => RT.ReaderTask<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category lifting
- * @since 2.13.0
- */
- export declare const fromReaderIOK: <A extends readonly unknown[], R, B>(
- f: (...a: A) => RIO.ReaderIO<R, B>
- ) => <E = never>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * Less strict version of [`chainReaderIOK`](#chainreaderiok).
- *
- * @category sequencing
- * @since 2.13.0
- */
- export declare const chainReaderIOKW: <A, R2, B>(
- f: (a: A) => ReaderIO<R2, B>
- ) => <R1, E>(ma: ReaderTaskEither<R1, E, A>) => ReaderTaskEither<R1 & R2, E, B>
- /**
- * @category sequencing
- * @since 2.13.0
- */
- export declare const chainReaderIOK: <A, R, B>(
- f: (a: A) => ReaderIO<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * Less strict version of [`chainFirstReaderIOK`](#chainfirstreaderiok).
- *
- * @category sequencing
- * @since 2.13.0
- */
- export declare const chainFirstReaderIOKW: <A, R2, B>(
- f: (a: A) => ReaderIO<R2, B>
- ) => <R1, E>(ma: ReaderTaskEither<R1, E, A>) => ReaderTaskEither<R1 & R2, E, A>
- /**
- * @category sequencing
- * @since 2.13.0
- */
- export declare const chainFirstReaderIOK: <A, R, B>(
- f: (a: A) => ReaderIO<R, B>
- ) => <E>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const FromEither: FromEither3<URI>
- /**
- * @category conversions
- * @since 2.0.0
- */
- export declare const fromOption: <E>(onNone: Lazy<E>) => <A, R = unknown>(fa: Option<A>) => ReaderTaskEither<R, E, A>
- /**
- * @category lifting
- * @since 2.10.0
- */
- export declare const fromOptionK: <E>(
- onNone: Lazy<E>
- ) => <A extends ReadonlyArray<unknown>, B>(
- f: (...a: A) => Option<B>
- ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.10.0
- */
- export declare const chainOptionK: <E>(
- onNone: Lazy<E>
- ) => <A, B>(f: (a: A) => Option<B>) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.4.0
- */
- export declare const chainEitherK: <E, A, B>(
- f: (a: A) => E.Either<E, B>
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * 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: <E2, A, B>(
- f: (a: A) => Either<E2, B>
- ) => <R, E1>(ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E1 | E2, B>
- /**
- * @category sequencing
- * @since 2.12.0
- */
- export declare const chainFirstEitherK: <A, E, B>(
- f: (a: A) => E.Either<E, B>
- ) => <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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: <A, E2, B>(
- f: (a: A) => Either<E2, B>
- ) => <R, E1>(ma: ReaderTaskEither<R, E1, A>) => ReaderTaskEither<R, E1 | E2, A>
- /**
- * @category lifting
- * @since 2.0.0
- */
- export declare const fromPredicate: {
- <E, A, B extends A>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <R = unknown>(
- a: A
- ) => ReaderTaskEither<R, E, B>
- <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R = unknown, B extends A = A>(
- b: B
- ) => ReaderTaskEither<R, E, B>
- <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R = unknown>(a: A) => ReaderTaskEither<R, E, A>
- }
- /**
- * @category filtering
- * @since 2.0.0
- */
- export declare const filterOrElse: {
- <E, A, B extends A>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <R>(
- ma: ReaderTaskEither<R, E, A>
- ) => ReaderTaskEither<R, E, B>
- <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R, B extends A>(
- mb: ReaderTaskEither<R, E, B>
- ) => ReaderTaskEither<R, E, B>
- <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- }
- /**
- * 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: {
- <A, B extends A, E2>(refinement: Refinement<A, B>, onFalse: (a: A) => E2): <R, E1>(
- ma: ReaderTaskEither<R, E1, A>
- ) => ReaderTaskEither<R, E1 | E2, B>
- <A, E2>(predicate: Predicate<A>, onFalse: (a: A) => E2): <R, E1, B extends A>(
- mb: ReaderTaskEither<R, E1, B>
- ) => ReaderTaskEither<R, E1 | E2, B>
- <A, E2>(predicate: Predicate<A>, onFalse: (a: A) => E2): <R, E1>(
- ma: ReaderTaskEither<R, E1, A>
- ) => ReaderTaskEither<R, E1 | E2, A>
- }
- /**
- * @category lifting
- * @since 2.4.0
- */
- export declare const fromEitherK: <E, A extends ReadonlyArray<unknown>, B>(
- f: (...a: A) => E.Either<E, B>
- ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const FromIO: FromIO3<URI>
- /**
- * @category lifting
- * @since 2.10.0
- */
- export declare const fromIOK: <A extends ReadonlyArray<unknown>, B>(
- f: (...a: A) => IO<B>
- ) => <R = unknown, E = never>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.10.0
- */
- export declare const chainIOK: <A, B>(
- f: (a: A) => IO<B>
- ) => <R, E>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.10.0
- */
- export declare const chainFirstIOK: <A, B>(
- f: (a: A) => IO<B>
- ) => <R, E>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * @category instances
- * @since 2.10.0
- */
- export declare const FromTask: FromTask3<URI>
- /**
- * @category lifting
- * @since 2.10.0
- */
- export declare const fromTaskK: <A extends ReadonlyArray<unknown>, B>(
- f: (...a: A) => T.Task<B>
- ) => <R = unknown, E = never>(...a: A) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.10.0
- */
- export declare const chainTaskK: <A, B>(
- f: (a: A) => T.Task<B>
- ) => <R, E>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>
- /**
- * @category sequencing
- * @since 2.10.0
- */
- export declare const chainFirstTaskK: <A, B>(
- f: (a: A) => T.Task<B>
- ) => <R, E>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>
- /**
- * 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<R, E, A, B>(
- acquire: ReaderTaskEither<R, E, A>,
- use: (a: A) => ReaderTaskEither<R, E, B>,
- release: (a: A, e: Either<E, B>) => ReaderTaskEither<R, E, void>
- ): ReaderTaskEither<R, E, B>
- /**
- * Less strict version of [`bracket`](#bracket).
- *
- * @since 2.12.0
- */
- export declare function bracketW<R1, E1, A, R2, E2, B, R3, E3>(
- acquire: ReaderTaskEither<R1, E1, A>,
- use: (a: A) => ReaderTaskEither<R2, E2, B>,
- release: (a: A, e: Either<E2, B>) => ReaderTaskEither<R3, E3, void>
- ): ReaderTaskEither<R1 & R2 & R3, E1 | E2 | E3, B>
- /**
- * @category do notation
- * @since 2.9.0
- */
- export declare const Do: ReaderTaskEither<unknown, never, {}>
- /**
- * @category do notation
- * @since 2.8.0
- */
- export declare const bindTo: <N extends string>(
- name: N
- ) => <R, E, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, { readonly [K in N]: A }>
- declare const let_: <N extends string, A, B>(
- name: Exclude<N, keyof A>,
- f: (a: A) => B
- ) => <R, E>(
- fa: ReaderTaskEither<R, E, A>
- ) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: 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: <N extends string, A, R, E, B>(
- name: Exclude<N, keyof A>,
- f: (a: A) => ReaderTaskEither<R, E, B>
- ) => (
- ma: ReaderTaskEither<R, E, A>
- ) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: 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: <N extends string, A, R2, E2, B>(
- name: Exclude<N, keyof A>,
- f: (a: A) => ReaderTaskEither<R2, E2, B>
- ) => <R1, E1>(
- fa: ReaderTaskEither<R1, E1, A>
- ) => 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: <N extends string, A, R, E, B>(
- name: Exclude<N, keyof A>,
- fb: ReaderTaskEither<R, E, B>
- ) => (
- fa: ReaderTaskEither<R, E, A>
- ) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: 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: <A, N extends string, R2, E2, B>(
- name: Exclude<N, keyof A>,
- fb: ReaderTaskEither<R2, E2, B>
- ) => <R1, E1>(
- fa: ReaderTaskEither<R1, E1, A>
- ) => 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<unknown, never, readonly []>
- /**
- * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativePar)`.
- *
- * @category traversing
- * @since 2.11.0
- */
- export declare const traverseReadonlyNonEmptyArrayWithIndex: <A, R, E, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: ReadonlyNonEmptyArray<A>) => ReaderTaskEither<R, E, ReadonlyNonEmptyArray<B>>
- /**
- * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativePar)`.
- *
- * @category traversing
- * @since 2.11.0
- */
- export declare const traverseReadonlyArrayWithIndex: <A, R, E, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]>
- /**
- * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`.
- *
- * @category traversing
- * @since 2.11.0
- */
- export declare const traverseReadonlyNonEmptyArrayWithIndexSeq: <A, R, E, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: ReadonlyNonEmptyArray<A>) => ReaderTaskEither<R, E, ReadonlyNonEmptyArray<B>>
- /**
- * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.
- *
- * @category traversing
- * @since 2.11.0
- */
- export declare const traverseReadonlyArrayWithIndexSeq: <A, R, E, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]>
- /**
- * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const traverseArrayWithIndex: <R, E, A, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>>
- /**
- * Equivalent to `ReadonlyArray#traverse(Applicative)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const traverseArray: <R, E, A, B>(
- f: (a: A) => ReaderTaskEither<R, E, B>
- ) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]>
- /**
- * Equivalent to `ReadonlyArray#sequence(Applicative)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const sequenceArray: <R, E, A>(
- arr: ReadonlyArray<ReaderTaskEither<R, E, A>>
- ) => ReaderTaskEither<R, E, ReadonlyArray<A>>
- /**
- * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const traverseSeqArrayWithIndex: <R, E, A, B>(
- f: (index: number, a: A) => ReaderTaskEither<R, E, B>
- ) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>>
- /**
- * Equivalent to `ReadonlyArray#traverse(ApplicativeSeq)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const traverseSeqArray: <R, E, A, B>(
- f: (a: A) => ReaderTaskEither<R, E, B>
- ) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]>
- /**
- * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`.
- *
- * @category traversing
- * @since 2.9.0
- */
- export declare const sequenceSeqArray: <R, E, A>(
- arr: ReadonlyArray<ReaderTaskEither<R, E, A>>
- ) => ReaderTaskEither<R, E, ReadonlyArray<A>>
- /**
- * 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<URI> & Bifunctor3<URI> & Alt3<URI> & MonadTask3<URI> & MonadThrow3<URI>
- /**
- * 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: <R, E, A>(S: Semigroup<A>) => Semigroup<ReaderTaskEither<R, E, A>>
- /**
- * Use [`getApplicativeMonoid`](./Applicative.ts.html#getapplicativemonoid) instead.
- *
- * @category zone of death
- * @since 2.0.0
- * @deprecated
- */
- export declare const getApplyMonoid: <R, E, A>(M: Monoid<A>) => Monoid<ReaderTaskEither<R, E, A>>
- /**
- * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead.
- *
- * @category zone of death
- * @since 2.0.0
- * @deprecated
- */
- export declare const getSemigroup: <R, E, A>(S: Semigroup<A>) => Semigroup<ReaderTaskEither<R, E, A>>
- /**
- * Use [`getApplicativeReaderTaskValidation`](#getapplicativereadertaskvalidation) and [`getAltReaderTaskValidation`](#getaltreadertaskvalidation) instead.
- *
- * @category instances
- * @since 2.3.0
- * @deprecated
- */
- export declare function getReaderTaskValidation<E>(
- SE: Semigroup<E>
- ): Monad3C<URI, E> & Bifunctor3<URI> & Alt3C<URI, E> & MonadTask3C<URI, E> & MonadThrow3C<URI, E>
- /**
- * @category zone of death
- * @since 2.0.0
- * @deprecated
- */
- export declare function run<R, E, A>(ma: ReaderTaskEither<R, E, A>, r: R): Promise<Either<E, A>>
|