https://kotlinlang.org logo
#koin-contributors
Title
# koin-contributors
m

Mihai Voicescu

11/12/2021, 5:45 PM
Correct me if I am wrong, Koin in JS seem to be using
::class.getFullName()
as the qualifier. This seems to have a major drawback: if 2 classes are named the same they will count as the same one, even though they are different Why not use
::class.js
as the qualifier? This grants access to the actual JS implementation so even if 2 classes are named the same they will count as different. If you really want the Map.Key of the instances to be String you can also use
::class.js.name
. This will provide the actual name of the class which should be unique given a module at least. Maybe even use the
typeOf<T>()
as the key? This should also solve template collision.
a

arnaud.giuliani

11/15/2021, 10:46 AM
Hello @Mihai Voicescu thanks for your proposal, it would help yes 👍
m

Mihai Voicescu

11/16/2021, 5:27 PM
What would help 😅 ? Multiple ideas in that bug report