Hello everyone, I’m dipping my toes in KMP and am ...
# multiplatform
t
Hello everyone, I’m dipping my toes in KMP and am looking for a way to re-expose an entire data class from a dependency in my “actual” part of the expect/actual. All the examples I can find create new classes entirely, but in my case I’d like to just “pass it through” basically. I have these classes ready to go and well tested in specific iOS and JVM/Android libraries; all I need is to basically re-expose them, but so far I have not been able to do that even in Koltin. Any tips/examples you could point me to?
l
If the name and type of all expect methods and variables matches your existing class, you can use a typealias. It essentially looks like: actual typealias ExpectedFoo = ActualFoo.
t
Seems to be working so far! Thanks a bunch. I’ll keep playing with it, but already a few things are passing the tests. 🚀