Last active
August 3, 2020 06:08
-
-
Save jakejrichards/fea7554a505e4581610832b4d272e7dc to your computer and use it in GitHub Desktop.
This file contains 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
import { Action } from 'redux'; | |
interface User { | |
name: string; | |
age: number; | |
} | |
export interface LoadingState { | |
users: boolean; | |
} | |
export interface ApplicationState { | |
loading: LoadingState; | |
users: User[]; | |
} | |
export interface LoadUsersRequest extends Action { | |
type: 'loadUsersRequest'; | |
} | |
export interface LoadUsersSuccess extends Action { | |
type: 'loadUsersSuccess'; | |
users: User[]; | |
} | |
export interface LoadUsersError extends Action { | |
type: 'loadUsersError'; | |
} | |
export type ApplicationAction = | |
| LoadUsersRequest | |
| LoadUsersSuccess | |
| LoadUsersError; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment