effect-io-ai

Package: effect
Module: Either

Either.try

Imports a synchronous side-effect into a pure Either value, translating any thrown exceptions into typed failed eithers creating with Either.left.

Signature

declare const try: { <A, E>(options: { readonly try: LazyArg<A>; readonly catch: (error: unknown) => E; }): Either<A, E>; <A>(evaluate: LazyArg<A>): Either<A, unknown>; }

Source

Since v2.0.0