Appearance
wrap()
wrap<V, E>(callback: () => V, catcher?: (err: unknown) => E): Result<V, E>
V
E
callback
catcher?
err
unknown
Result
Source: result.ts
Wraps a synchronous operation that might throw in a Result.
E = Error
Error
() => V
(err: unknown) => E
Result<V, E>