Circle V2 API Docs
Preparing search index...
@repo/safe
unwrap
Function unwrap
unwrap
<
T
,
TError
extends
CircleError
<
string
,
string
>
=
CircleError
<
string
,
string
>
,
>
(
result
:
Safe
<
T
,
TError
>
,
)
:
T
Unwraps a safe result, throwing an error if the result is an error.
Type Parameters
T
TError
extends
CircleError
<
string
,
string
>
=
CircleError
<
string
,
string
>
Parameters
result
:
Safe
<
T
,
TError
>
Returns
T
unwrap
<
T
,
TError
extends
CircleError
<
string
,
string
>
=
CircleError
<
string
,
string
>
,
>
(
result
:
Promise
<
Safe
<
T
,
TError
>
>
,
)
:
Promise
<
T
>
Unwraps a safe result, throwing an error if the result is an error.
Type Parameters
T
TError
extends
CircleError
<
string
,
string
>
=
CircleError
<
string
,
string
>
Parameters
result
:
Promise
<
Safe
<
T
,
TError
>
>
Returns
Promise
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Circle V2 API Docs
Loading...
Unwraps a safe result, throwing an error if the result is an error.