-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce boiler-plate for binding singletons where all constructors parameters are DI instances #408
Comments
Here is a gist that implements this for Kodein, based on the Koin implementation: https://gist.github.com/rocketraman/84302f408d34576052e07589e9e90b26. |
Hi, You can use it with le maven repository You can now bind with
I would like to introduced an API like
But I have some crashes with Kotlin/JS and the heavy usage of inlined function |
Great!
Hmm, have you reported this to YouTrack? Is that with the IR compiler, or legacy compiler, or both? |
It is an existing issue, that tackle the problem with a "don't use to many inline functions with typeOf()". I will need to investigate on this, to know why. |
Currently, binding singletons where all the constructor dependencies are coming from Kodein is quite verbose, and requires update every time the number of constructor parameters changes.
It would be nice if there were a shortened syntax to automatically use the primary constructor of a class, passing in the result of
instance()
for every parameter.e.g.
This feature is now available in Koin. See https://insert-koin.io/docs/reference/koin-core/dsl-update.
The text was updated successfully, but these errors were encountered: