https://kotlinlang.org logo
#touchlab-tools
Title
# touchlab-tools
с

Стефан Јовановић

11/12/2023, 10:23 AM
One more question. I have a generic sealed class in the commonMain:
Copy code
@Serializable
sealed class RequestState<out T> {
    @Serializable
    data class Success<out T>(val data: T) : RequestState<T>()
    @Serializable
    data class Error(val message: String) : RequestState<Nothing>()
    @Serializable
    data object Loading : RequestState<Nothing>()
    @Serializable
    data object Idle : RequestState<Nothing>()
}
Is there a way to receive the actual type in the iOS module, without explicitly casting it from Any?