tryError Documentation
Function: unwrapTryResult()
Function
```ts function unwrapTryResult<T, E>( result ): | { data: T; success: true; } | { error: E; success: false; }; ``` Defined in: [types.ts:169](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/types.ts#L169) IMPROVED: Type-safe result unwrapping with better inference
tryError API Documentation v0.0.1-alpha.1
tryError API Documentation / unwrapTryResult
Function: unwrapTryResult()
function unwrapTryResult<T, E>(
result
):
| {
data: T;
success: true;
}
| {
error: E;
success: false;
};
Defined in: types.ts:169
IMPROVED: Type-safe result unwrapping with better inference
Type Parameters
T
T
E
E
extends TryError
<string
>
Parameters
result
TryResult
<T
, E
>
Returns
| {
data
: T
;
success
: true
;
}
| {
error
: E
;
success
: false
;
}