Preparing search index...
The search index is not available
pure
pure
@pistonite/pure
result
tryAsync
Function tryAsync
tryAsync
<
T
,
E
=
unknown
>
(
fn
:
()
=>
Promise
<
T
>
)
:
Promise
<
Result
<
T
,
E
>
>
Wrap an async function with try-catch and return a Promise
.
Type Parameters
T
E
=
unknown
Parameters
fn
:
()
=>
Promise
<
T
>
Returns
Promise
<
Result
<
T
,
E
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
pure
Loading...
Wrap an async function with try-catch and return a Promise.