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
parent
3ed064f9b0
commit
22cf8be060
|
@ -161,15 +161,7 @@ export declare function usePrimeVue(): {
|
||||||
declare const plugin: Plugin;
|
declare const plugin: Plugin;
|
||||||
export default plugin;
|
export default plugin;
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
declare module 'vue' {
|
||||||
interface Vue {
|
|
||||||
$primevue: {
|
|
||||||
config: PrimeVueConfiguration;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
$primevue: {
|
$primevue: {
|
||||||
config: PrimeVueConfiguration;
|
config: PrimeVueConfiguration;
|
||||||
|
|
|
@ -27,13 +27,7 @@ export interface ConfirmationServiceMethods {
|
||||||
close(): void;
|
close(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
declare module 'vue' {
|
||||||
interface Vue {
|
|
||||||
$confirm: ConfirmationServiceMethods;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
$confirm: ConfirmationServiceMethods;
|
$confirm: ConfirmationServiceMethods;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,7 @@ export interface DialogServiceMethods {
|
||||||
open(content: any, options?: DynamicDialogOptions): DynamicDialogInstance;
|
open(content: any, options?: DynamicDialogOptions): DynamicDialogInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
declare module 'vue' {
|
||||||
interface Vue {
|
|
||||||
$dialog: DialogServiceMethods;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
$dialog: DialogServiceMethods;
|
$dialog: DialogServiceMethods;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,13 +39,7 @@ export interface ToastServiceMethods {
|
||||||
removeAllGroups(): void;
|
removeAllGroups(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
declare module 'vue' {
|
||||||
interface Vue {
|
|
||||||
$toast: ToastServiceMethods;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
$toast: ToastServiceMethods;
|
$toast: ToastServiceMethods;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue