diff --git a/package-lock.json b/package-lock.json index bbc78be..12b750f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typesafe-actions", - "version": "2.2.0", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -6656,9 +6656,9 @@ } }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", + "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 82febee..a289a14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typesafe-actions", - "version": "2.2.0", + "version": "3.0.0", "description": "Typesafe Action Creators for Redux / Flux Architectures (in TypeScript)", "author": "Piotr Witek (http://piotrwitek.github.io)", "repository": "https://github.com/piotrwitek/typesafe-actions", @@ -51,7 +51,7 @@ "rollup-plugin-uglify": "3.0.0", "ts-jest": "22.4.6", "tslint": "5.12.0", - "typescript": "2.9.2" + "typescript": "3.2.2" }, "keywords": [ "typescript", diff --git a/src/create-action.ts b/src/create-action.ts index cd2da60..86ec764 100644 --- a/src/create-action.ts +++ b/src/create-action.ts @@ -30,7 +30,9 @@ export function createAction< const actionCreator: AC = actionResolverHandler == null ? ((() => action(actionType)) as AC) - : actionResolverHandler(action.bind(null, actionType) as any); + : actionResolverHandler(action.bind(null, actionType) as Parameters< + typeof actionResolverHandler + >[0]); return Object.assign(actionCreator, { getType: () => actionType,