fix: global vue type augmentation

Augment vue types instead of 'vue/types/vue' and '@vue/runtime-core' to fix incompatibility with other libraries caused by the current augmentation behavior
pull/6380/head
sumomo015 2024-09-11 11:42:55 +09:00
parent 2fa7e77121
commit 327532fc4d
No known key found for this signature in database
GPG Key ID: 5B09CB559AA86445
4 changed files with 4 additions and 31 deletions

View File

@ -358,16 +358,7 @@ export declare function usePrimeVue(): {
declare const plugin: Plugin;
export default plugin;
declare module 'vue/types/vue' {
interface Vue {
$primevue: {
config: PrimeVueConfiguration;
changeTheme: PrimeVueChangeTheme;
};
}
}
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

@ -25,13 +25,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;
}