From: Eduardo San Martin Morote Date: Mon, 3 May 2021 08:32:31 +0000 (+0200) Subject: feat(pinia): allow chaining pinia.use X-Git-Tag: v0.4.0~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5e7a6ea30bc4e1b3e4aa734fa0154258c9003c7;p=thirdparty%2Fvuejs%2Fpinia.git feat(pinia): allow chaining pinia.use --- 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,