From 200102d2225b8e0dc32138f7b5328f9143377e8a Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 7 Aug 2020 17:45:50 +0300 Subject: [PATCH] createAction: fix the action type. --- src/store/actions.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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", () => {