Jeffrey Dawes
11/01/2024, 4:03 PMinterface Fetcher<Key : Any, Network : Any>
Because Network
is non-null how do we represent a value that does not exist or is not found? Do you wrap the response in a result type? Do you return a Fetcher.Error
of some kind?blakelee
11/01/2024, 7:02 PMdata class NetworkType(
val data: TypeData
)
sealed class TypeData {
data class Single(val type: Type) : TypeData()
data class Collection(val types: List<Type>) : TypeData()
}
You could just make the data nullable in this case if there's nothing to add