UNPKG

@effect-ts/system

Version:

Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.

13 lines (10 loc) 339 B
// ets_tracing: off import * as O from "../Option/index.js" import type { Effect } from "./effect.js" import { mapError_ } from "./mapError.js" /** * Maps the error value of this effect to an optional value. */ export function asSomeError<R, E, A>(self: Effect<R, E, A>, __trace?: string) { return mapError_(self, O.some, __trace) }