]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: rename internal _hotUpdate
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 21 Jul 2021 16:41:40 +0000 (18:41 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 21 Jul 2021 16:41:40 +0000 (18:41 +0200)
src/store.ts
src/types.ts

index 87dc9ea4de50745ea73ec73eb50bc6c492096f4d..5e6e219bd1d6426ce4a2a3a0d77231ba1a109ddf 100644 (file)
@@ -432,7 +432,7 @@ function createSetupStore<
 
   // add the hotUpdate before plugins to allow them to override it
   if (__DEV__) {
-    store.hotUpdate = markRaw((newStore) => {
+    store._hotUpdate = markRaw((newStore) => {
       newStore._hmrPayload.state.forEach((stateKey) => {
         if (stateKey in store.$state) {
           // @ts-expect-error
@@ -736,7 +736,7 @@ export function defineStore(idOrOptions: any, setup?: any, setupOptions?: any) {
             true
           )
 
-      hot.hotUpdate(newStore as any)
+      hot._hotUpdate(newStore as any)
 
       // cleanup the state properties and the store from the cache
       delete pinia.state.value[hotId]
index 418d65c83d2dce9e0df224e43cfb618fdaf92fae..63b5a8766f9b0c27d063d53f2e9c9b170077eb7c 100644 (file)
@@ -261,7 +261,7 @@ export interface StoreWithState<
    *
    * @internal
    */
-  hotUpdate(useStore: Store<Id, S, G, A>): void
+  _hotUpdate(useStore: Store<Id, S, G, A>): void
 
   /**
    * Payload of the hmr update. Dev only.