Variable: Result
Result:
object
Type declaration
Err()
Err: <
T
,E
>(error
?) =>Result
<T
,E
>
Type Parameters
Type Parameter | Description |
---|---|
T | The type of the value to not contain. |
E | The type of the error to contain. |
Parameters
Parameter | Type |
---|---|
error ? | E |
Returns
Result
<T
, E
>
Result
Ok()
Ok: <
T
,E
>(value
?) =>Result
<T
,E
>
Type Parameters
Type Parameter | Description |
---|---|
T | The type of the value to contain. |
E | The type of the error to not contain. |
Parameters
Parameter | Type |
---|---|
value ? | T |
Returns
Result
<T
, E
>
Result
isErr()
isErr: <
T
,E
>(result
) =>result is Object
Type Parameters
Type Parameter |
---|
T |
E |
Parameters
Parameter | Type |
---|---|
result | Result <T , E > |
Returns
result is Object
true if the Result is an error, otherwise false.
isOk()
isOk: <
T
,E
>(result
) =>result is Object
Type Parameters
Type Parameter |
---|
T |
E |
Parameters
Parameter | Type |
---|---|
result | Result <T , E > |
Returns
result is Object
true if the Result is OK, otherwise false.
isUnknownError()
isUnknownError: <
T
,E
>(result
) =>result is Object
Type Parameters
Type Parameter |
---|
T |
E |
Parameters
Parameter | Type |
---|---|
result | Result <T , E > |
Returns
result is Object
true if the Result is an unknwon error, otherwise false.