isResultOk
Returns true for successful Result tuple
260 bytes
Usage
Check if a value is both a Result
tuple and an Ok
result.
import * as _ from 'radashi'
declare const value: unknown
if (_.isResultOk(value)) { value // <-- now an Ok<unknown> type value[1] // <-- This is the resulting value!}
Also see the related isResult and isResultErr functions.