From 704cc8af5059f074ff84bf5f4fc1ec5997c0acc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Dematt=C3=A8?= Date: Sun, 24 Jan 2021 16:45:13 +0100 Subject: [PATCH] Vue 3 + TS: fix for config.globalProperties services --- .../confirmationservice/ConfirmationService.d.ts | 8 +++++++- src/components/toastservice/ToastService.d.ts | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/confirmationservice/ConfirmationService.d.ts b/src/components/confirmationservice/ConfirmationService.d.ts index 880990bb7..de2ab1d8b 100644 --- a/src/components/confirmationservice/ConfirmationService.d.ts +++ b/src/components/confirmationservice/ConfirmationService.d.ts @@ -11,4 +11,10 @@ declare module 'vue/types/vue' { interface Vue { $confirm: ConfirmationServiceMethods; } -} \ No newline at end of file +} + +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + $confirm: ConfirmationServiceMethods; + } +} diff --git a/src/components/toastservice/ToastService.d.ts b/src/components/toastservice/ToastService.d.ts index 193f0064f..88a375aa3 100755 --- a/src/components/toastservice/ToastService.d.ts +++ b/src/components/toastservice/ToastService.d.ts @@ -14,3 +14,8 @@ declare module 'vue/types/vue' { } } +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + $toast: ToastServiceMethods; + } +}