```interface Fetcher<Key : Any, Network : Any>``` ...
# store
j
Copy code
interface 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?
b
I do something like this
Copy code
data 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
🙌 1
plus one 1