From d5e7a6ea30bc4e1b3e4aa734fa0154258c9003c7 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 3 May 2021 10:32:31 +0200 Subject: [PATCH] feat(pinia): allow chaining pinia.use --- src/rootStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rootStore.ts b/src/rootStore.ts index 24df34cd..82236032 100644 --- a/src/rootStore.ts +++ b/src/rootStore.ts @@ -51,7 +51,7 @@ export interface Pinia { * * @param plugin - store plugin to add */ - use(plugin: PiniaStorePlugin): void + use(plugin: PiniaStorePlugin): Pinia /** * Installed store plugins @@ -109,6 +109,7 @@ export function createPinia(): Pinia { use(plugin) { _p.push(plugin) + return pinia }, _p, -- 2.47.3