isOk
Type guard that narrows a Result to Ok.
Usage
isOk(result)
isOk is how you discriminate a Result in TypeScript — inside the truthy branch, result.value is T; in the falsy branch, result is Err and result.error is Error.
For pattern matching across both branches, prefer match with P.ok / P.err — it's exhaustive and reads better with multi-arm logic.
Parameters
resultResult<T>required
the result to test.
Returns
true if the result is a success.
See also
isErr— the inverse guardunwrap— extract the value or throwP.ok— pattern value formatch- Result & Errors concept guide