Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion : Great example #2

Open
ideaBlender opened this issue Aug 14, 2020 · 0 comments
Open

Suggestion : Great example #2

ideaBlender opened this issue Aug 14, 2020 · 0 comments

Comments

@ideaBlender
Copy link

Could not find anywhere to leave a thank you for creating this. Ty its awesome.

Just a suggestion for the team, with the type coupling between client/server we could really use some documentation on how to create a serializable sealed class for the server results.

Something like this:

@Serializable
sealed class ApiResponse {
    data class Success<out T : Any>(val value: T) : ApiResponse()
    object Failure : ApiResponse()
    object InFlight : ApiResponse()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant