MicroUtils/koin/src/commonMain/kotlin/FactoryWithRandomQualifier.kt

13 lines
414 B
Kotlin
Raw Normal View History

2022-09-14 16:14:20 +00:00
package dev.inmo.micro_utils.koin
import org.koin.core.definition.Definition
import org.koin.core.module.Module
/**
* Will be useful in case you need to declare some singles with one type several types, but need to separate them and do
* not care about how :)
*/
inline fun <reified T : Any> Module.factoryWithRandomQualifier(
noinline definition: Definition<T>
2022-09-14 16:21:30 +00:00
) = factory(RandomQualifier(), definition)