-
-
Save designdevy/aa22615b7a0723191ea23c9124ce3945 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