aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/setting.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers/setting.ts')
-rw-r--r--src/content/reducers/setting.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/content/reducers/setting.ts b/src/content/reducers/setting.ts
index a49db6d..fa8e8ee 100644
--- a/src/content/reducers/setting.ts
+++ b/src/content/reducers/setting.ts
@@ -1,11 +1,18 @@
-import actions from 'content/actions';
+import * as actions from '../actions';
+
+export interface State {
+ keymaps: any[];
+}
const defaultState = {
// keymaps is and arrays of key-binding pairs, which is entries of Map
keymaps: [],
};
-export default function reducer(state = defaultState, action = {}) {
+export default function reducer(
+ state: State = defaultState,
+ action: actions.SettingAction,
+): State {
switch (action.type) {
case actions.SETTING_SET:
return { ...action.value };