aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/find.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers/find.ts')
-rw-r--r--src/content/reducers/find.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/content/reducers/find.ts b/src/content/reducers/find.ts
index 4560e2c..8c3e637 100644
--- a/src/content/reducers/find.ts
+++ b/src/content/reducers/find.ts
@@ -1,11 +1,19 @@
-import actions from 'content/actions';
+import * as actions from '../actions';
-const defaultState = {
+export interface State {
+ keyword: string | null;
+ found: boolean;
+}
+
+const defaultState: State = {
keyword: null,
found: false,
};
-export default function reducer(state = defaultState, action = {}) {
+export default function reducer(
+ state: State = defaultState,
+ action: actions.FindAction,
+): State {
switch (action.type) {
case actions.FIND_SET_KEYWORD:
return { ...state,