From: Eduardo San Martin Morote Date: Mon, 25 Oct 2021 14:23:17 +0000 (+0200) Subject: fix(types): remove unused option hydrate for setup stores X-Git-Tag: @pinia/nuxt@0.1.0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37d07fb29ef2885d94cae3b3f212cea83772a073;p=thirdparty%2Fvuejs%2Fpinia.git fix(types): remove unused option hydrate for setup stores --- diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index 488c3b6e..f4a037b1 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -644,7 +644,6 @@ function createSetupStore< store, app: pinia._a, pinia, - // @ts-expect-error options: optionsForPlugin, }) )! @@ -660,7 +659,6 @@ function createSetupStore< store, app: pinia._a, pinia, - // @ts-expect-error options: optionsForPlugin, }) )! diff --git a/packages/pinia/src/types.ts b/packages/pinia/src/types.ts index c0b03a07..4f7ef205 100644 --- a/packages/pinia/src/types.ts +++ b/packages/pinia/src/types.ts @@ -608,16 +608,7 @@ export type _ExtractGettersFromSetupStore = SS extends undefined | void * stores. Extend this interface if you want to add custom options to both kinds * of stores. */ -export interface DefineStoreOptionsBase { - /** - * Allows hydrating the store during SSR when there is an available state in - * pinia.state. - * - * @param store - the store - * @param initialState - initialState - */ - hydrate?(store: Store, initialState: UnwrapRef): void -} +export interface DefineStoreOptionsBase {} /** * Options parameter of `defineStore()` for option stores. Can be extended to @@ -658,6 +649,15 @@ export interface DefineStoreOptions< _StoreWithGetters & PiniaCustomProperties > + + /** + * Allows hydrating the store during SSR when there is an available state in + * pinia.state. + * + * @param store - the store + * @param initialState - initialState + */ + hydrate?(storeState: UnwrapRef, initialState: UnwrapRef): void } /**