Marcello Galhardo
02/04/2022, 5:50 PMsingle({ HelloServiceImpl() }) {
named("whatever")
createdAtStart()
bind<HelloService>()
}
If you add the options DSL to the end, you will have the side effect that this won’t work:
single { Whatever() } // where is the options?
// To compile, you will need to change it into this?
single({ Whatever() })
Or did you imagine a different syntax for the traditional methods (single, viewModel, etc)?
One alternative design could be something like:
single { HelloServiceImpl() } withOptions {
named("whatever")
createdAtStart()
bind<HelloService>()
}