diff --git a/.changeset/minor-result-type-fixes.md b/.changeset/minor-result-type-fixes.md new file mode 100644 index 00000000..009fabf7 --- /dev/null +++ b/.changeset/minor-result-type-fixes.md @@ -0,0 +1,5 @@ +--- +"@effect-atom/atom": patch +--- + +fix Result type signatures diff --git a/packages/atom/src/Result.ts b/packages/atom/src/Result.ts index eae8a4e8..881faa1a 100644 --- a/packages/atom/src/Result.ts +++ b/packages/atom/src/Result.ts @@ -136,7 +136,7 @@ export const fromExitWithPrevious = ( */ export const waitingFrom = (previous: Option.Option>): Result => { if (previous._tag === "None") { - return initial(true) + return initial(true) } return waiting(previous.value) } @@ -413,7 +413,7 @@ export const map: { * @category combinators */ export const flatMap: { - (f: (a: A, prev: Success) => Result): (self: Result) => Result + (f: (a: A, prev: Success) => Result): (self: Result) => Result (self: Result, f: (a: A, prev: Success) => Result): Result } = dual(2, (self: Result, f: (a: A, prev: Success) => Result): Result => { switch (self._tag) { @@ -651,10 +651,6 @@ class BuilderImpl { refinement: Refinement, B>, f: (result: B) => Option.Option ): any - when( - refinement: Predicate>, - f: (result: Result) => Option.Option - ): any when( refinement: Predicate>, f: (result: Result) => Option.Option