instance

inline fun <R> instance(noinline block: ComponentBuilderBlock? = null): R(source)

Retrieve an instance of type R.

Return

An instance of R

Parameters

block

An optional builder block to pass runtime dependencies to the factory.

Throws


fun <R> instance(key: TypeKey<R>, block: ComponentBuilderBlock? = null): R(source)

Retrieve an instance of type R.

Return

An instance of R

Parameters

key

The TypeKey of the service to resolve.

block

An optional builder block to pass runtime dependencies to the factory.

Throws