From 63bde1620c099f6a35d9326e730fe4f375f1f9f6 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 12 May 2021 09:28:57 +0200 Subject: [PATCH] style: reformat --- src/devtools/plugin.ts | 15 +++++++++------ src/mapHelpers.ts | 5 ++--- src/rootStore.ts | 7 +++---- src/store.ts | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/devtools/plugin.ts b/src/devtools/plugin.ts index d9e1c857..fcba6f69 100644 --- a/src/devtools/plugin.ts +++ b/src/devtools/plugin.ts @@ -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[] ) } } diff --git a/src/mapHelpers.ts b/src/mapHelpers.ts index c59a7d2b..eac63bd0 100644 --- a/src/mapHelpers.ts +++ b/src/mapHelpers.ts @@ -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 diff --git a/src/rootStore.ts b/src/rootStore.ts index c54ef5bc..ec293a34 100644 --- a/src/rootStore.ts +++ b/src/rootStore.ts @@ -109,10 +109,9 @@ declare module '@vue/runtime-core' { } } -export const piniaSymbol = (__DEV__ - ? Symbol('pinia') - : /* istanbul ignore next */ - Symbol()) as InjectionKey +export const piniaSymbol = ( + __DEV__ ? Symbol('pinia') : /* istanbul ignore next */ Symbol() +) as InjectionKey /** * Context argument passed to Pinia plugins. diff --git a/src/store.ts b/src/store.ts index 9eef8c41..41e5f9cb 100644 --- a/src/store.ts +++ b/src/store.ts @@ -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 -- 2.47.3