mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-10-12 02:40:26 +00:00
add kdocs to koin common module
This commit is contained in:
@@ -4,8 +4,14 @@ 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 :)
|
||||
* Declares a single instance with a random qualifier in the Koin module.
|
||||
* This is useful when you need to declare multiple instances of the same type
|
||||
* but want them to be uniquely identifiable without manually specifying qualifiers.
|
||||
*
|
||||
* @param T The type of instance to be created
|
||||
* @param createdAtStart Whether the instance should be created when the Koin module starts (default: false)
|
||||
* @param definition The definition function that creates the instance
|
||||
* @return A Koin definition for the single instance with a random qualifier
|
||||
*/
|
||||
inline fun <reified T : Any> Module.singleWithRandomQualifier(
|
||||
createdAtStart: Boolean = false,
|
||||
|
Reference in New Issue
Block a user