mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-06-02 07:55:13 +00:00
14 lines
465 B
Kotlin
14 lines
465 B
Kotlin
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.singleWithRandomQualifier(
|
|
createdAtStart: Boolean = false,
|
|
noinline definition: Definition<T>
|
|
) = single(RandomQualifier(), createdAtStart, definition)
|