optional

fun <T> optional(initializer: M.() -> T?): Delegate.Optional<M, T>

Creates and registers delegate for an optional (nullable) injectable property.

Return

Optional (nullable) property delegate.

Parameters

initializer

Initializer function from the module context to value.