diff --git a/src/store/actions.ts b/src/store/actions.ts index 62a5a9b..1150dec 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -1,12 +1,22 @@ // SPDX-FileCopyrightText: © 2017 EteSync Authors // SPDX-License-Identifier: AGPL-3.0-only -import { createAction } from "redux-actions"; +import { createAction as origCreateAction, ActionMeta } from "redux-actions"; import * as Etebase from "etebase"; import { SettingsType } from "./"; +type FunctionAny = (...args: any[]) => any; + +function createAction( + actionType: string, + payloadCreator: Func, + metaCreator?: MetaFunc +): (..._params: Parameters) => ActionMeta, ReturnType> { + return origCreateAction(actionType, payloadCreator, metaCreator as any) as any; +} + export const resetKey = createAction( "RESET_KEY", () => {