aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/input.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers/input.ts')
-rw-r--r--src/content/reducers/input.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/content/reducers/input.ts b/src/content/reducers/input.ts
index 23e7dd2..6257e49 100644
--- a/src/content/reducers/input.ts
+++ b/src/content/reducers/input.ts
@@ -1,10 +1,17 @@
-import actions from 'content/actions';
+import * as actions from '../actions';
-const defaultState = {
+export interface State {
+ keys: string[];
+}
+
+const defaultState: State = {
keys: []
};
-export default function reducer(state = defaultState, action = {}) {
+export default function reducer(
+ state: State = defaultState,
+ action: actions.InputAction,
+): State {
switch (action.type) {
case actions.INPUT_KEY_PRESS:
return { ...state,