From: Eduardo San Martin Morote Date: Wed, 3 Mar 2021 15:27:29 +0000 (+0100) Subject: types: add global types for injecting pinia X-Git-Tag: v0.2.0~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=030d72680350138b3178a2d29e9cd0575fd99a5c;p=thirdparty%2Fvuejs%2Fpinia.git types: add global types for injecting pinia --- diff --git a/src/rootStore.ts b/src/rootStore.ts index 4326ce3e..48592f78 100644 --- a/src/rootStore.ts +++ b/src/rootStore.ts @@ -117,6 +117,17 @@ export interface Pinia { Vue: VueConstructor } +declare module 'vue/types/vue' { + interface Vue { + $pinia: Pinia + } +} + +declare module 'vue/types/options' { + interface ComponentOptions { + pinia?: Pinia + } +} /** * Creates a Pinia instance to be used by the application