Seeking Advice on Structuring Services with Shared Dependencies in Effect TypeScript
I'm finding myself with this pattern quite often:
the example here is very simple, but the underlying pattern is i have a service that returns some effect funcs with shared dependencies, which i want to wrap with the service dependencies.
The obvious solution would be to have the functions be defined inline in the constructor effect, but this gets out of hand quickly and would lead to massive service constructors, which i don't reallly dig.
But i feel like i'm somehow doing an anti pattern here, does this code look sensible or am I not groking some fundamental pattern here?
the example here is very simple, but the underlying pattern is i have a service that returns some effect funcs with shared dependencies, which i want to wrap with the service dependencies.
The obvious solution would be to have the functions be defined inline in the constructor effect, but this gets out of hand quickly and would lead to massive service constructors, which i don't reallly dig.
But i feel like i'm somehow doing an anti pattern here, does this code look sensible or am I not groking some fundamental pattern here?
