What I’ve done was to bind using Any and the Inter...
# kodein
j
What I’ve done was to bind using Any and the Interface/Abstraction instead. Then, I’m providing two ways of retrieving the same data:
Copy code
list.forEach {
  bind(key) from provider {...} // 1. this will take either the actual type or as in my case the interface/abstract super class

  bind<Any>(key) with provider {...} // 2. bind in a generic type to provide a common way to get any value
}
Then, we can access those with: 1. kodein.instance<Any>(key) as T 2. kodein.instance<SuperType>(key)