From 6e4daf68438e74b6280697cc0bbb842fbe882374 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 10 Jul 2023 23:16:13 +0100 Subject: [PATCH] Fixed #4122 - The types in PrimeVue config are not accessible --- components/lib/config/PrimeVue.d.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/components/lib/config/PrimeVue.d.ts b/components/lib/config/PrimeVue.d.ts index a9c599d01..0fba6354d 100644 --- a/components/lib/config/PrimeVue.d.ts +++ b/components/lib/config/PrimeVue.d.ts @@ -88,7 +88,7 @@ import { TreeTablePassThroughOptions } from '../treetable'; import { DefaultPTOptions } from '../ts-helpers'; import { VirtualScrollerPassThroughOptions } from '../virtualscroller'; -interface PrimeVueConfiguration { +export interface PrimeVueConfiguration { ripple?: boolean; inputStyle?: string; locale?: PrimeVueLocaleOptions; @@ -98,14 +98,14 @@ interface PrimeVueConfiguration { unstyled?: boolean; } -interface PrimeVueZIndexOptions { +export interface PrimeVueZIndexOptions { modal?: number; overlay?: number; menu?: number; tooltip?: number; } -interface PrimeVuePTOptions { +export interface PrimeVuePTOptions { accordion?: DefaultPTOptions; accordiontab?: DefaultPTOptions; autocomplete?: DefaultPTOptions; @@ -198,7 +198,7 @@ interface PrimeVuePTOptions { }; } -interface PrimeVueLocaleAriaOptions { +export interface PrimeVueLocaleAriaOptions { trueLabel?: string; falseLabel?: string; nullLabel?: string; @@ -249,7 +249,7 @@ interface PrimeVueLocaleAriaOptions { rotateLeft?: string; } -interface PrimeVueLocaleOptions { +export interface PrimeVueLocaleOptions { startsWith?: string; contains?: string; notContains?: string; @@ -317,13 +317,11 @@ interface PrimeVueLocaleOptions { aria?: PrimeVueLocaleAriaOptions; } -interface SwitchTheme { - (currentTheme: string, newTheme: string, linkElementId: string, callback?: Function): void; -} +export type PrimeVueChangeTheme = (currentTheme: string, newTheme: string, linkElementId: string, callback?: Function) => void; export declare function usePrimeVue(): { config: PrimeVueConfiguration; - changeTheme: SwitchTheme; + changeTheme: PrimeVueChangeTheme; }; declare const plugin: Plugin; @@ -333,7 +331,7 @@ declare module 'vue/types/vue' { interface Vue { $primevue: { config: PrimeVueConfiguration; - changeTheme: SwitchTheme; + changeTheme: PrimeVueChangeTheme; }; } } @@ -342,7 +340,7 @@ declare module '@vue/runtime-core' { interface ComponentCustomProperties { $primevue: { config: PrimeVueConfiguration; - changeTheme: SwitchTheme; + changeTheme: PrimeVueChangeTheme; }; } }