From: Eduardo San Martin Morote Date: Wed, 28 Jul 2021 17:39:17 +0000 (+0200) Subject: refactor: move code around X-Git-Tag: v2.0.0-rc.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=408315c9ba739ec97e7347b5f54b41d561e68845;p=thirdparty%2Fvuejs%2Fpinia.git refactor: move code around --- diff --git a/src/types.ts b/src/types.ts index e6d4ccdd..204db643 100644 --- a/src/types.ts +++ b/src/types.ts @@ -533,22 +533,6 @@ export type GettersTree = Record< */ export type ActionsTree = Record -/** - * Options passed to `defineStore()` that are common between option and setup - * 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 -} - /** * @internal */ @@ -606,6 +590,22 @@ export type _ExtractGettersFromSetupStore = _SpreadPropertiesFromObject< ComputedRef > +/** + * Options passed to `defineStore()` that are common between option and setup + * 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 +} + /** * Options parameter of `defineStore()` for option stores. Can be extended to * augment stores with the plugin API. @see {@link DefineStoreOptionsBase}.