diff options
Diffstat (limited to 'src/content/reducers/addon.ts')
-rw-r--r-- | src/content/reducers/addon.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/content/reducers/addon.ts b/src/content/reducers/addon.ts index 0def55a..2131228 100644 --- a/src/content/reducers/addon.ts +++ b/src/content/reducers/addon.ts @@ -1,10 +1,17 @@ -import actions from 'content/actions'; +import * as actions from '../actions'; -const defaultState = { +export interface State { + enabled: boolean; +} + +const defaultState: State = { enabled: true, }; -export default function reducer(state = defaultState, action = {}) { +export default function reducer( + state: State = defaultState, + action: actions.AddonAction, +): State { switch (action.type) { case actions.ADDON_SET_ENABLED: return { ...state, |