Enhancing Effect.succeedNone with Generic Argument

I think Effect.succeedNone should take a generic argument, otherwise in some cases I have to manually do Effect.succeed(Option.none<MyType>()). This happens when I have an effect like this:

return myEffect.pipe(Effect.asSome, Effect.catchTag("SomeTag", Effect.succeedNone))


The resulting type has Option.Option<MyEffectSuccess> | Option.Option<never> which isn't really usable. The goal being that I want to convert an effect to an option, but only in the case of a single expected error tag.
Was this page helpful?