call

abstract suspend fun <T> call(kFunction: KFunction<T>, init: suspend (DependencyKey) -> Any): T(source)

Invokes the specified function and provides the necessary dependencies for its parameters using the provided initialization logic.

Report a problem

Return

The result of the function invocation.

Parameters

kFunction

The function reference to invoke. The parameters of this function will be resolved using dependency injection.

init

A lambda function that resolves dependencies required for the function invocation using a DependencyKey.

Type Parameters

T

The return type of the function to be invoked.