Preparing search index...
The search index is not available
guardx
guardx
run
safe
Function safe
Run a function safely and return the result (or the thrown error).
safe
<
T
=
unknown
,
E
=
Error
>
(
fn
:
()
=>
T
)
:
SafeRunResult
<
T
,
E
>
Type Parameters
T
=
unknown
E
=
Error
Parameters
fn
:
()
=>
T
Function to run
Returns
SafeRunResult
<
T
,
E
>
Result of the run
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
guardx
Loading...
Run a function safely and return the result (or the thrown error).