Last active
May 16, 2019 10:34
-
-
Save klemola/35898d915b0b26aef1cd5d6058a0e6a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface NotAsked { | |
type: "NotAsked"; | |
} | |
interface Loading { | |
type: "Loading"; | |
} | |
interface Success<T> { | |
type: "Success"; | |
data: T; | |
} | |
interface Failure<E> { | |
type: "Failure"; | |
error: E; | |
} | |
export type RemoteData<T, E> = NotAsked | Loading | Success<T> | Failure<E>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment