Skip to content

Commit 8fbee24

Browse files
add isWaiting (#328)
Co-authored-by: Tim <[email protected]>
1 parent 6d16974 commit 8fbee24

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changeset/angry-rats-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect-atom/atom": patch
3+
---
4+
5+
add `isWaiting` refinement

packages/atom/src/Result.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ const ResultProto = {
108108
}
109109
}
110110

111+
/**
112+
* @since 1.0.0
113+
* @category refinements
114+
*/
115+
export const isWaiting = <A, E>(result: Result<A, E>): boolean => result.waiting
116+
111117
/**
112118
* @since 1.0.0
113119
* @category models

0 commit comments

Comments
 (0)