kapsule-core / net.gouline.kapsule / Kapsule / optional

optional

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

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

Parameters

initializer - Initializer function from the module context to value.

Return
Optional (nullable) property delegate.