aboutsummaryrefslogtreecommitdiff
path: root/src/settings/reducers/setting.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/reducers/setting.ts')
-rw-r--r--src/settings/reducers/setting.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/settings/reducers/setting.ts b/src/settings/reducers/setting.ts
index 54033aa..47c21bf 100644
--- a/src/settings/reducers/setting.ts
+++ b/src/settings/reducers/setting.ts
@@ -1,13 +1,23 @@
-import actions from 'settings/actions';
+import * as actions from '../actions';
-const defaultState = {
+interface State {
+ source: string;
+ json: string;
+ form: any;
+ error: string;
+}
+
+const defaultState: State = {
source: '',
json: '',
form: null,
error: '',
};
-export default function reducer(state = defaultState, action = {}) {
+export default function reducer(
+ state = defaultState,
+ action: actions.SettingAction,
+) {
switch (action.type) {
case actions.SETTING_SET_SETTINGS:
return { ...state,