fromThrowable
fromThrowable<
T>(fn):Result<T,string>
Defined in: packages/core/src/result.ts:49
Catch a synchronous throw and turn it into Err with a string message.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”() => T
Returns
Section titled “Returns”Result<T, string>