Combining Union Schemas with Either Types in Effect Typescript

I have a Union schema where some of the schemas return Either.left errors and some return Either.right data.

I was hoping to be able to do something like S.EitherFromSelf({ right: S.Never, left: S.instanceOf(MyError) }) in my error schemas and S.EitherFromSelf({ right: MyData, left: S.Never }) in my success schemas, and have it collapse together, but they don't seem compatible and end up as a union type like Either.Either<never, MyDefaultError> | Either.Either<never, MyError1 | MyError2> | Either.Either<MyData, never>
Was this page helpful?