happy-rusty • Docs
happy-rusty / isResult
function isResult<T, E>(r): r is Result<T, E>
Checks if a value is a Result
.
Type Parameter | Description |
---|---|
T |
The expected type of the success value contained within the Result . |
E |
The expected type of the error value contained within the Result . |
Parameter | Type | Description |
---|---|---|
r |
unknown |
The value to be checked as a Result . |
r is Result<T, E>
true
if the value is a Result
, otherwise false
.