Hi <@UHAJKUSTU>, I noticed in <v1.1.18> you made t...
# reaktive
o
Hi @Arkadii Ivanov, I noticed in v1.1.18 you made the wrappers types parameters non-null (SingleWrapper, ObservableWrapper, etc), this is now preventing me form doing
SingleWrapper<String?>
Is there any particular reason to this change? Or workaround to deal with Nullability/Absent of Values?
a
Hey! This is due to the way how generics are exposed to Swift via Objective C. If in Kotlin you define
class Foo<T>
, then in Swift it will be always nullable type. E.g.
fun foo(): Foo<String>
will be nullable in Swift. So we decided to make it explicitly non-null, so it is also non-null in Swift. You have some options: use Maybe, introduce some sort of Optional, introduce your own nullable Wrappers.
o
Yeah, I kinda thought it was because of that, thank you
👍 1