fix: global vue type augmentation (#6207)

Augment vue types instead of 'vue/types/vue' and '@vue/runtime-core' to fix incompatibility with other libraries caused by the current augmentation behavior

Fixes: #6199

Co-authored-by: sceee <11340487+sceee@users.noreply.github.com>
pull/6346/head
sceee 2024-09-04 14:41:48 +02:00 committed by GitHub
parent 3ed064f9b0
commit 22cf8be060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 30 deletions

View File

@ -161,15 +161,7 @@ export declare function usePrimeVue(): {
declare const plugin: Plugin;
export default plugin;
declare module 'vue/types/vue' {
interface Vue {
$primevue: {
config: PrimeVueConfiguration;
};
}
}
declare module '@vue/runtime-core' {
declare module 'vue' {
interface ComponentCustomProperties {
$primevue: {
config: PrimeVueConfiguration;

View File

@ -27,13 +27,7 @@ export interface ConfirmationServiceMethods {
close(): void;
}
declare module 'vue/types/vue' {
interface Vue {
$confirm: ConfirmationServiceMethods;
}
}
declare module '@vue/runtime-core' {
declare module 'vue' {
interface ComponentCustomProperties {
$confirm: ConfirmationServiceMethods;
}

View File

@ -26,13 +26,7 @@ export interface DialogServiceMethods {
open(content: any, options?: DynamicDialogOptions): DynamicDialogInstance;
}
declare module 'vue/types/vue' {
interface Vue {
$dialog: DialogServiceMethods;
}
}
declare module '@vue/runtime-core' {
declare module 'vue' {
interface ComponentCustomProperties {
$dialog: DialogServiceMethods;
}

View File

@ -39,13 +39,7 @@ export interface ToastServiceMethods {
removeAllGroups(): void;
}
declare module 'vue/types/vue' {
interface Vue {
$toast: ToastServiceMethods;
}
}
declare module '@vue/runtime-core' {
declare module 'vue' {
interface ComponentCustomProperties {
$toast: ToastServiceMethods;
}