### Elegant Pattern Matching for Union Schema in TypeScript
Considering a union schema (being discriminated or not) such as:
What's the best/recommended way to do some stuff based on which input is passed to the function ?
Because doing things such as:
(or with a switch statement should work fine but does not feel very elegant)
I started to read about the pattern matching guide on the effect website. However the thing I missed is why the different output paths (I don't know the right term for this) expect non-effect functions:
Because I want to yield* some effect and I cannot seem to find the proper way to do with Match.
What's the best/recommended way to do some stuff based on which input is passed to the function ?
Because doing things such as:
(or with a switch statement should work fine but does not feel very elegant)
I started to read about the pattern matching guide on the effect website. However the thing I missed is why the different output paths (I don't know the right term for this) expect non-effect functions:
Because I want to yield* some effect and I cannot seem to find the proper way to do with Match.
