Providing Constructor Arguments for Services in Effect Typescript Library
I'm trying to find the most idiomatic way to provide "constructor arguments"/"a config" when I'm defining a service
I've found two approaches now:
- Define the arguments as their own services and load them
- Use Context.Tag and provide a custom make function
I'm starting to lean towards the latter - it seems to be the least messy.
Would it be possible to allow the default initializers in Effect.Service take a function that returns the effect? (See screenshot)
I've found two approaches now:
- Define the arguments as their own services and load them
- Use Context.Tag and provide a custom make function
I'm starting to lean towards the latter - it seems to be the least messy.
Would it be possible to allow the default initializers in Effect.Service take a function that returns the effect? (See screenshot)

