]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
build: better tree shake
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 7 Jan 2021 16:22:43 +0000 (17:22 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 7 Jan 2021 16:22:43 +0000 (17:22 +0100)
src/rootStore.ts

index 0d0422bf7a154ac27f0c94cd51aa98f54e0dcbce..17d363a97dd52d67c948f9196ccd6c81b2cbe547 100644 (file)
@@ -49,20 +49,10 @@ export const storesMap = new WeakMap<
   Map<string, [StoreWithState<string, StateTree>, StateDescriptor<StateTree>]>
 >()
 
-/**
- * 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<string, StateTree> {
-  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<GenericStore>()
+export const stores = /*#__PURE__*/ new Set<GenericStore>()
 
 export function registerStore(store: GenericStore) {
   stores.add(store)