saket
08/16/2019, 2:34 AM// Kotlin Native
expect class Feature
// Android
actual typealias Feature = AndroidFeature
where AndroidFeature is a class
// iOS
actual typealias Feature = iOSFeature
where iOSFeature is an interface
jw
08/16/2019, 2:37 AMinline class
works well here because you can provide an abstraction the encapsulates the original different types without paying the overhead of traditional interface/class encapsulation at runtime.typealias
and another would have to define a wrapper. It's hard to build something that typealiases
on every platform thoughsaket
08/16/2019, 2:42 AMjw
08/16/2019, 3:12 AMtypealias
to an inline class
on a single platform? I would have to try it again. It was for experimenting with making a multiplatform data/time library.saket
08/16/2019, 3:14 AMjw
08/16/2019, 3:17 AMsaket
08/16/2019, 3:49 PMkpgalligan
08/17/2019, 5:18 PMsaket
08/17/2019, 7:10 PMkpgalligan
08/17/2019, 7:12 PMsaket
08/17/2019, 7:14 PMsaket
on github.kpgalligan
08/17/2019, 7:15 PMpublishToMavenLocal
on the firestore project.kpg/cleaning_api_2
DocumentReference
, I’ve renamed get
to getDocument
. https://github.com/touchlab/FirestoreKMP/blob/kpg/cleaning_api_2/firestore/src/commonMain/kotlin/co/touchlab/firebase/firestore/DocumentReference.kt#L14saket
08/18/2019, 12:10 AMIt’s like having guests show up when you haven’t cleaned the placeHahah no worries. This looks like a good reference project for beginners like me. Thanks Kevin!