diff --git a/package.json b/package.json index cf18c53..365b580 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,6 @@ "eemoji": "^2.0.2", "eslint": "^8.57.0", "jsdom": "^24.0.0", - "pinia-plugin-persistedstate": "^3.1.0", "typescript": "^5.3.3", "unbuild": "^2.0.0", "unocss": "^0.58.5", diff --git a/src/generic.ts b/src/generic.ts index ad04d5e..7488042 100644 --- a/src/generic.ts +++ b/src/generic.ts @@ -1,4 +1,5 @@ import { type Store, type StoreDefinition, defineStore } from 'pinia' +// import type { ExtractStore, PiniaActionThis, PiniaGetterThis, StoreThis } from 'pinia-generic' import type { ExtractStore, PiniaActionThis, PiniaGetterThis, StoreThis } from './types' import { filterUndefined } from './utils' @@ -10,7 +11,7 @@ import { filterUndefined } from './utils' * @param state - The state object. */ export function createState< - TStore extends Store, + TStore extends Store, TGenericStore extends Store = Store, >( state: { @@ -30,7 +31,7 @@ TGenericStore extends Store = Store, * @param getters - The getters object. */ export function createGetters< - TStore extends Store, + TStore extends Store, TGenericStore extends Store = Store, >( getters: PiniaGetterThis, @@ -47,7 +48,7 @@ TGenericStore extends Store = Store, * @param actions - The actions object. */ export function createActions< - TStore extends Store, + TStore extends Store, TGenericStore extends Store = Store, >( actions: PiniaActionThis, @@ -64,7 +65,7 @@ TGenericStore extends Store = Store, * @param baseStore - Another base store to extend. */ export function defineGenericStore< - TStore extends Store, + TStore extends Store, TGenericStore extends Store = Store, >( store: StoreThis, @@ -106,7 +107,7 @@ TGenericStore extends Store = Store, * @param genericStore - The generic store object. */ export function useStore< - TStore extends Store, + TStore extends Store, TGenericStore extends Store = Store, >( id: TStore['$id'],