From 030d72680350138b3178a2d29e9cd0575fd99a5c Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 3 Mar 2021 16:27:29 +0100 Subject: [PATCH] types: add global types for injecting pinia --- src/rootStore.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.47.3