From: Eduardo San Martin Morote Date: Thu, 7 Jan 2021 16:22:43 +0000 (+0100) Subject: build: better tree shake X-Git-Tag: v2.0.0-alpha.7~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5311b992f01fca643c9c3c50b1b2f8bb251d4c1a;p=thirdparty%2Fvuejs%2Fpinia.git build: better tree shake --- diff --git a/src/rootStore.ts b/src/rootStore.ts index 0d0422bf..17d363a9 100644 --- a/src/rootStore.ts +++ b/src/rootStore.ts @@ -49,20 +49,10 @@ export const storesMap = new WeakMap< Map, StateDescriptor]> >() -/** - * Gets the root state of all active stores. This is useful when reporting an application crash by - * retrieving the problematic state and send it to your error tracking service. - * - * @param pinia - application's pinia - */ -export function getRootState(pinia: Pinia): Record { - return pinia.state.value -} - /** * Client-side application instance used for devtools */ -export let clientApp: App | undefined +export let clientApp: App | undefined /*#__PURE__*/ export const setClientApp = (app: App) => (clientApp = app) export const getClientApp = () => clientApp @@ -163,7 +153,7 @@ export interface PiniaCustomProperties {} /** * Registered stores */ -export const stores = new Set() +export const stores = /*#__PURE__*/ new Set() export function registerStore(store: GenericStore) { stores.add(store)