]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
style: reformat
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 12 May 2021 07:28:57 +0000 (09:28 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 12 May 2021 07:28:57 +0000 (09:28 +0200)
src/devtools/plugin.ts
src/mapHelpers.ts
src/rootStore.ts
src/store.ts

index d9e1c8570fedc046dcf708e1e2038c0a66ad0fa8..fcba6f69322cf3b85d2965284e90ab0e9813dbbd 100644 (file)
@@ -89,11 +89,14 @@ export function addDevtools(app: App, store: GenericStore) {
           if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
             const stores = Array.from(registeredStores)
 
-            payload.rootNodes = (payload.filter
-              ? stores.filter((store) =>
-                  store.$id.toLowerCase().includes(payload.filter.toLowerCase())
-                )
-              : stores
+            payload.rootNodes = (
+              payload.filter
+                ? stores.filter((store) =>
+                    store.$id
+                      .toLowerCase()
+                      .includes(payload.filter.toLowerCase())
+                  )
+                : stores
             ).map(formatStoreForInspectorTree)
           }
         })
@@ -287,7 +290,7 @@ export function devtoolsPlugin<
       })
       return actions[actionName].apply(
         trackedStore,
-        (arguments as unknown) as any[]
+        arguments as unknown as any[]
       )
     }
   }
index c59a7d2ba1324cd2af4826a128894c9a1cbf2b86..eac63bd04ae7ea71184690a68ef5574eb4401cd5 100644 (file)
@@ -503,9 +503,8 @@ export function mapWritableState<
           },
           set(this: ComponentPublicInstance, value) {
             // it's easier to type it here as any
-            return (getCachedStore(this, useStore)[
-              keysOrMapper[key]
-            ] = value as any)
+            return (getCachedStore(this, useStore)[keysOrMapper[key]] =
+              value as any)
           },
         }
         return reduced
index c54ef5bc060bd7454811652c66183dd984d1f07c..ec293a34cd8b6262f6c230313b3fa4d468d51358 100644 (file)
@@ -109,10 +109,9 @@ declare module '@vue/runtime-core' {
   }
 }
 
-export const piniaSymbol = (__DEV__
-  ? Symbol('pinia')
-  : /* istanbul ignore next */
-    Symbol()) as InjectionKey<Pinia>
+export const piniaSymbol = (
+  __DEV__ ? Symbol('pinia') : /* istanbul ignore next */ Symbol()
+) as InjectionKey<Pinia>
 
 /**
  * Context argument passed to Pinia plugins.
index 9eef8c41fa5084c5ecf7740c8309f531e504fca9..41e5f9cbda4c195d8f7c35c1f153978cfd89bed1 100644 (file)
@@ -311,7 +311,7 @@ function buildStoreToUse<
       let ret
 
       try {
-        ret = actions[actionName].apply(localStore, (args as unknown) as any[])
+        ret = actions[actionName].apply(localStore, args as unknown as any[])
         Promise.resolve(ret).then(afterCallback).catch(onErrorCallback)
       } catch (error) {
         throw error