Skip to content

Commit

Permalink
docs(isResultOk): fix error in example
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlonPassos-git committed Sep 16, 2024
1 parent d67466e commit 1a90ccc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/typed/isResultOk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ description: Returns true for successful Result tuple
Check if a value is both a `Result` tuple and an `Ok` result.

```ts
import * as _ from 'radashi'

declare const value: unknown

if (isResultOk(value)) {
if (_.isResultOk(value)) {
value // <-- now an Ok<unknown> type
value[1] // <-- This is the resulting value!
}
Expand Down

0 comments on commit 1a90ccc

Please sign in to comment.