mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-10-27 10:11:22 +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 factory with a random qualifier in the Koin module.
|
||||
* This is useful when you need to declare multiple factory definitions of the same type
|
||||
* but want them to be uniquely identifiable without manually specifying qualifiers.
|
||||
* Unlike singles, factories create a new instance each time they are requested.
|
||||
*
|
||||
* @param T The type of instance to be created by the factory
|
||||
* @param definition The definition function that creates new instances
|
||||
* @return A Koin definition for the factory with a random qualifier
|
||||
*/
|
||||
inline fun <reified T : Any> Module.factoryWithRandomQualifier(
|
||||
noinline definition: Definition<T>
|
||||
|
||||
Reference in New Issue
Block a user