From: Eduardo San Martin Morote Date: Thu, 8 Apr 2021 09:12:21 +0000 (+0200) Subject: fix(types): enable autocomplete in object X-Git-Tag: v0.3.0~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50126119f6672a7c0a9efdd9c2e25eb5a6427dc0;p=thirdparty%2Fvuejs%2Fpinia.git fix(types): enable autocomplete in object --- 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