Skip to content

Commit

Permalink
asSome returns Option
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Jun 6, 2024
1 parent cbd6dd6 commit 6a5b005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/effect/src/Micro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ export const serviceOption = <I, S>(tag: Context.Tag<I, S>): Micro<Option.Option
*/
export const fromOption = <A>(option: Option.Option<A>): Micro<A, Option.None<never>> =>
make(function(_env, onResult) {
onResult(option._tag === "Some" ? Either.right(option.value) : ResultFail(Option.none()) as any)
onResult(option._tag === "Some" ? ResultSucceed(option.value) : ResultFail(Option.none()) as any)
})

/**
Expand Down Expand Up @@ -982,7 +982,7 @@ export const as: {
* @since 3.3.0
* @category mapping & sequencing
*/
export const asSome = <A, E, R>(self: Micro<A, E, R>): Micro<Option.Some<A>, E, R> => map(self, Option.some) as any
export const asSome = <A, E, R>(self: Micro<A, E, R>): Micro<Option.Option<A>, E, R> => map(self, Option.some) as any

/**
* Map the success value of this `Micro` effect to another `Micro` effect, then
Expand Down

0 comments on commit 6a5b005

Please sign in to comment.