Fix useProperty type

This commit is contained in:
Alexander Nozik 2021-04-08 13:50:43 +03:00
parent 53393e7958
commit 1a983665f8

View File

@ -26,10 +26,10 @@ public interface ItemPropertyProvider: ObservableItemProvider, MutableItemProvid
* Optional [owner] property is used for * Optional [owner] property is used for
*/ */
@DFExperimental @DFExperimental
public fun <O : ObservableItemProvider, T : Any> O.useProperty( public fun <O : ObservableItemProvider, T> O.useProperty(
property: KProperty1<O, T?>, property: KProperty1<O, T>,
owner: Any? = null, owner: Any? = null,
callBack: O.(T?) -> Unit, callBack: O.(T) -> Unit,
) { ) {
//Pass initial value. //Pass initial value.
callBack(property.get(this)) callBack(property.get(this))