Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 805 Bytes

isResult.md

File metadata and controls

36 lines (22 loc) · 805 Bytes

happy-rustyDocs


happy-rusty / isResult

Function: isResult()

function isResult<T, E>(r): r is Result<T, E>

Checks if a value is a Result.

Type Parameters

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.

Parameters

Parameter Type Description
r unknown The value to be checked as a Result.

Returns

r is Result<T, E>

true if the value is a Result, otherwise false.

Defined in

utils.ts:24