]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: move code around
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 28 Jul 2021 17:39:17 +0000 (19:39 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 28 Jul 2021 17:39:17 +0000 (19:39 +0200)
src/types.ts

index e6d4ccdd81a86629934c312f34cb7e94c21b817e..204db6439c4b02232480e76ab98bf7ada6352c78 100644 (file)
@@ -533,22 +533,6 @@ export type GettersTree<S extends StateTree> = Record<
  */
 export type ActionsTree = Record<string, _Method>
 
-/**
- * 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<S extends StateTree, Store> {
-  /**
-   * 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<S>): void
-}
-
 /**
  * @internal
  */
@@ -606,6 +590,22 @@ export type _ExtractGettersFromSetupStore<SS> = _SpreadPropertiesFromObject<
   ComputedRef<any>
 >
 
+/**
+ * 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<S extends StateTree, Store> {
+  /**
+   * 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<S>): void
+}
+
 /**
  * Options parameter of `defineStore()` for option stores. Can be extended to
  * augment stores with the plugin API. @see {@link DefineStoreOptionsBase}.