From a2fafc5c60996187dc34aaf1e5af2fcd62cead25 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 3 May 2021 10:55:42 +0200 Subject: [PATCH] refactor: correctly use DefineStoreOptions --- src/index.ts | 2 +- src/store.ts | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/index.ts b/src/index.ts index bffa8907..1bbc646b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,11 +12,11 @@ export { Store, StoreDefinition, GenericStore, - GenericStoreDefinition, StoreWithGetters, StoreWithActions, StoreWithState, PiniaCustomProperties, + DefineStoreOptions, } from './types' export { diff --git a/src/store.ts b/src/store.ts index 1c74e20d..d991aae5 100644 --- a/src/store.ts +++ b/src/store.ts @@ -269,20 +269,7 @@ export function defineStore< S extends StateTree, G extends GettersTree, A /* extends Record */ ->(options: { - id: Id - state?: () => S - getters?: G & ThisType & PiniaCustomProperties> - // allow actions use other actions - actions?: A & - ThisType< - A & - S & - StoreWithState & - StoreWithGetters & - PiniaCustomProperties - > -}): StoreDefinition { +>(options: DefineStoreOptions): StoreDefinition { const { id, state, getters, actions } = options function useStore(pinia?: Pinia | null): Store { -- 2.47.3