koin-core / org.koin.core / Koin / declare

declare

fun <reified T : Any> declare(instance: T, qualifier: Qualifier? = null, secondaryTypes: List<KClass<*>> = emptyList(), override: Boolean = false): Unit

Declare a component definition from the given instance This result of declaring a single definition of type T, returning the given instance

Parameters

instance - The instance you're declaring.

qualifier - Qualifier for this declaration

secondaryTypes - List of secondary bound types

override - Allows to override a previous declaration of the same type (default to false).