Creating a Helper Function to Catch and Remove Specific Errors in TypeScript
I'm trying to write a helper function that catches a specific error and remove it from the propagated error type.
For example
Which should result in
For example
Effect<R, Error1 | Error2 | Error3, A>, And thenWhich should result in
Effect<R, Error1 | Error3, A>. Currently unable to specify the expected error type Error2 without loosing the ability to exclude it from the output type. How do I go about that?