From 50126119f6672a7c0a9efdd9c2e25eb5a6427dc0 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 8 Apr 2021 11:12:21 +0200 Subject: [PATCH] fix(types): enable autocomplete in object --- src/mapHelpers.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/mapHelpers.ts b/src/mapHelpers.ts index 9639a752..4ed6f8b9 100644 --- a/src/mapHelpers.ts +++ b/src/mapHelpers.ts @@ -241,16 +241,10 @@ export function mapActions( * @param useStore - store to map from * @param keyMapper - object to define new names for the actions */ -export function mapActions< - Id extends string, - S extends StateTree, - G, - A, - KeyMapper extends Record ->( +export function mapActions( useStore: StoreDefinition, - keyMapper: KeyMapper -): MapActionsObjectReturn + keyMapper: Record +): MapActionsObjectReturn> /** * Allows directly using actions from your store without using the composition * API (`setup()`) by generating an object to be spread in the `methods` field -- 2.47.3