Table of contents


URI (type alias)

Signature

export type URI = typeof URI

ReaderTaskEither (class)

Signature

export class ReaderTaskEither<E, L, A> {
  constructor(readonly value: (e: E) => TaskEither<L, A>) { ... }
  ...
}

Added in v1.6.0

run (method)

Runs the inner TaskEither

Signature

run(e: E): Promise<Either<L, A>> { ... }

map (method)

Signature

map<B>(f: (a: A) => B): ReaderTaskEither<E, L, B> { ... }

ap (method)

Signature

ap<B>(fab: ReaderTaskEither<E, L, (a: A) => B>): ReaderTaskEither<E, L, B> { ... }

ap_ (method)

Flipped version of ap

Signature

ap_<B, C>(this: ReaderTaskEither<E, L, (b: B) => C>, fb: ReaderTaskEither<E, L, B>): ReaderTaskEither<E, L, C> { ... }

applyFirst (method)

Combine two effectful actions, keeping only the result of the first

Signature

applyFirst<B>(fb: ReaderTaskEither<E, L, B>): ReaderTaskEither<E, L, A> { ... }

applySecond (method)

Combine two effectful actions, keeping only the result of the second

Signature

applySecond<B>(fb: ReaderTaskEither<E, L, B>): ReaderTaskEither<E, L, B> { ... }

chain (method)

Signature

chain<B>(f: (a: A) => ReaderTaskEither<E, L, B>): ReaderTaskEither<E, L, B> { ... }

fold (method)

Signature

fold<R>(left: (l: L) => R, right: (a: A) => R): Reader<E, Task<R>> { ... }

mapLeft (method)

Signature

mapLeft<M>(f: (l: L) => M): ReaderTaskEither<E, M, A> { ... }

orElse (method)

Transforms the failure value of the ReaderTaskEither into a new ReaderTaskEither

Signature

orElse<M>(f: (l: L) => ReaderTaskEither<E, M, A>): ReaderTaskEither<E, M, A> { ... }

alt (method)

Signature

alt(fy: ReaderTaskEither<E, L, A>): ReaderTaskEither<E, L, A> { ... }

bimap (method)

Signature

bimap<V, B>(f: (l: L) => V, g: (a: A) => B): ReaderTaskEither<E, V, B> { ... }

local (method)

Signature

local<E2 = E>(f: (e: E2) => E): ReaderTaskEither<E2, L, A> { ... }

Added in v1.6.1

URI (constant)

Signature

export const URI = ...

readerTaskEither (constant)

Signature

export const readerTaskEither: Monad3<URI> & Bifunctor3<URI> & Alt3<URI> & MonadIO3<URI> & MonadTask3<URI> = ...

Added in v1.6.0

readerTaskEitherSeq (constant)

Like readerTaskEither but ap is sequential

Signature

export const readerTaskEitherSeq: typeof readerTaskEither = ...

Added in v1.10.0

ask (function)

Signature

export const ask = <E, L>(): ReaderTaskEither<E, L, E> => ...

Added in v1.6.0

asks (function)

Signature

export const asks = <E, L, A>(f: (e: E) => A): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromEither (function)

Signature

export const fromEither = <E, L, A>(fa: Either<L, A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromIO (function)

Signature

export const fromIO = <E, L, A>(fa: IO<A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromIOEither (function)

Signature

export const fromIOEither = <E, L, A>(fa: IOEither<L, A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromLeft (function)

Signature

export const fromLeft = <E, L, A>(l: L): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromPredicate (function)

Signature

export function fromPredicate<E, L, A, B extends A>(
  predicate: Refinement<A, B>,
  onFalse: (a: A) => L
): ((a: A) => ReaderTaskEither<E, L, B>)
export function fromPredicate<E, L, A>(
  predicate: Predicate<A>,
  onFalse: (a: A) => L
): ((a: A) => ReaderTaskEither<E, L, A>) { ... }

Added in v1.6.0

fromReader (function)

Signature

export const fromReader = <E, L, A>(fa: Reader<E, A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

fromTaskEither (function)

Signature

export const fromTaskEither = <E, L, A>(fa: TaskEither<L, A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

left (function)

Signature

export const left = <E, L, A>(fa: Task<L>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

local (function)

Signature

export const local = <E, E2 = E>(f: (e: E2) => E) => <L, A>(
  fa: ReaderTaskEither<E, L, A>
): ReaderTaskEither<E2, L, A> => ...

Added in v1.6.0

right (function)

Signature

export const right = <E, L, A>(fa: Task<A>): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0

tryCatch (function)

Signature

export const tryCatch = <E, L, A>(
  f: (e: E) => Promise<A>,
  onrejected: (reason: unknown, e: E) => L
): ReaderTaskEither<E, L, A> => ...

Added in v1.6.0