We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf8973f commit 1df2927Copy full SHA for 1df2927
src/result.ts
@@ -63,7 +63,7 @@ export function err<E>(error: E): Result<never, E> {
63
*/
64
export function isOk<T, E>(
65
result: Result<T, E>,
66
-): result is { _tag: "Ok"; value: T } {
+): result is Extract<Result<T, E>, { _tag: "Ok" }> {
67
return result._tag === "Ok";
68
}
69
@@ -90,7 +90,7 @@ export function isOk<T, E>(
90
91
export function isErr<T, E>(
92
93
-): result is { _tag: "Err"; error: E } {
+): result is Extract<Result<T, E>, { _tag: "Err" }> {
94
return result._tag === "Err";
95
96
0 commit comments