Understanding TaggedError and Effect.fail in Effect Typescript Library
I'm having a bit of confusion with:
1. what a
2. what it's type is?
I know that within a generator, calling
However, what happens if you just return a
Is this just interpreted as a normal Error value, or is it wrapped in an
https://effect.website/play/#13c0538af53d
1. what a
new TaggedError looks like internally, and 2. what it's type is?
I know that within a generator, calling
yield* new SomeTaggedError() will automatically wrap it within an Effect.fail(...) constructor and sequence it with the preceding effects.However, what happens if you just return a
new SomeTaggedError() directly? It's confusing because i can type it as either a TaggedError class or an Effect. Is this just interpreted as a normal Error value, or is it wrapped in an
Effect.fail that short-circuits?https://effect.website/play/#13c0538af53d
