From: Eduardo San Martin Morote Date: Wed, 21 Jul 2021 16:41:40 +0000 (+0200) Subject: refactor: rename internal _hotUpdate X-Git-Tag: v2.0.0-rc.0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8977a68558631f36efe2ca5419ecdc29d7121657;p=thirdparty%2Fvuejs%2Fpinia.git refactor: rename internal _hotUpdate --- diff --git a/src/store.ts b/src/store.ts index 87dc9ea4..5e6e219b 100644 --- a/src/store.ts +++ b/src/store.ts @@ -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] diff --git a/src/types.ts b/src/types.ts index 418d65c8..63b5a876 100644 --- a/src/types.ts +++ b/src/types.ts @@ -261,7 +261,7 @@ export interface StoreWithState< * * @internal */ - hotUpdate(useStore: Store): void + _hotUpdate(useStore: Store): void /** * Payload of the hmr update. Dev only.