effect-io-ai

Package: effect
Module: STM

STM.try

Imports a synchronous side-effect into a pure value, translating any thrown exceptions into typed failed effects.

Signature

declare const try: { <A, E>(options: { readonly try: LazyArg<A>; readonly catch: (u: unknown) => E; }): STM<A, E>; <A>(try_: LazyArg<A>): STM<A, unknown>; }

Source

Since v2.0.0