Seeking Feedback on Generic RequestResolver Design in Typescript

Is what I'm doing here with a concept of a generic RequestResolver anywhere close to making sense / being a good idea?

https://effect.website/play/#499107db3a6b

It's awkward that I can't find a way to get the class properties from an instance.. so I have to do the clunky switch statement. Is there something I'm missing?

I like the idea of defining all the logic about a certain request in one place
Was this page helpful?