diff --git a/packages/primevue/src/autocomplete/AutoComplete.d.ts b/packages/primevue/src/autocomplete/AutoComplete.d.ts index e5a159bb86..3d77e47a36 100755 --- a/packages/primevue/src/autocomplete/AutoComplete.d.ts +++ b/packages/primevue/src/autocomplete/AutoComplete.d.ts @@ -13,7 +13,7 @@ import type { ChipPassThroughOptions } from 'primevue/chip'; import type { InputTextPassThroughOptions } from 'primevue/inputtext'; import type { PassThroughOptions } from 'primevue/passthrough'; import type { VirtualScrollerItemOptions, VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from 'primevue/virtualscroller'; -import { TransitionProps, VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, TransitionProps, VNode, VNodeProps } from 'vue'; export declare type AutoCompletePassThroughOptionType = AutoCompletePassThroughAttributes | ((options: AutoCompletePassThroughMethodOptions) => AutoCompletePassThroughAttributes | string) | string | null | undefined; @@ -316,7 +316,7 @@ export interface AutoCompleteContext { /** * Defines valid properties in AutoComplete component. */ -export interface AutoCompleteProps { +export interface AutoCompleteProps { /** * Value of the component. */ @@ -332,23 +332,23 @@ export interface AutoCompleteProps { /** * An array of suggestions to display. */ - suggestions?: any[]; + suggestions?: T[]; /** * Property name or getter function to use as the label of an option. */ - optionLabel?: string | ((data: any) => string) | undefined; + optionLabel?: string | ((data: T) => string) | undefined; /** * Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. */ - optionDisabled?: string | ((data: any) => boolean) | undefined; + optionDisabled?: string | ((data: T) => boolean) | undefined; /** * Property name or getter function to use as the label of an option group. */ - optionGroupLabel?: string | ((data: any) => string) | undefined; + optionGroupLabel?: string | ((data: T) => string) | undefined; /** * Property name or getter function that refers to the children options of option group. */ - optionGroupChildren?: string | ((data: any) => any[]) | undefined; + optionGroupChildren?: string | ((data: T) => any[]) | undefined; /** * whether typeahead is active or not. * @defaultValue true @@ -585,7 +585,7 @@ export interface AutoCompleteProps { * Defines valid slots in AutoComplete component. * @todo Next release we should complete types for all slots */ -export interface AutoCompleteSlots { +export interface AutoCompleteSlots { /** * Custom chip template. * @param {Object} scope - chip slot's params. @@ -617,7 +617,7 @@ export interface AutoCompleteSlots { /** * Displayed options */ - suggestions: any[]; + suggestions: T[]; }): VNode[]; /** * Custom footer template of panel. @@ -631,7 +631,7 @@ export interface AutoCompleteSlots { /** * Displayed options */ - suggestions: any[]; + suggestions: T[]; }): VNode[]; /** * Custom option template. @@ -641,7 +641,7 @@ export interface AutoCompleteSlots { /** * Option instance */ - option: any; + option: T; /** * Index of the option */ @@ -655,7 +655,7 @@ export interface AutoCompleteSlots { /** * Option instance */ - option: any; + option: T; /** * Index of the option */ @@ -898,11 +898,19 @@ export declare type AutoCompleteEmits = EmitFn; * @group Component * */ -declare const AutoComplete: DefineComponent; +declare const AutoComplete: { + new ( + props: AutoCompleteProps + ): { + $props: AutoCompleteProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: AutoCompleteSlots; + $emit: EmitFn; + }; +}; declare module 'vue' { export interface GlobalComponents { - AutoComplete: DefineComponent; + AutoComplete: typeof AutoComplete; } } diff --git a/packages/primevue/src/cascadeselect/CascadeSelect.d.ts b/packages/primevue/src/cascadeselect/CascadeSelect.d.ts index f9045c02a1..455dbf54a1 100644 --- a/packages/primevue/src/cascadeselect/CascadeSelect.d.ts +++ b/packages/primevue/src/cascadeselect/CascadeSelect.d.ts @@ -10,7 +10,7 @@ import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core'; import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode, VNodeProps } from 'vue'; export declare type CascadeSelectPassThroughOptionType = CascadeSelectPassThroughAttributes | ((options: CascadeSelectPassThroughMethodOptions) => CascadeSelectPassThroughAttributes | string) | string | null | undefined; @@ -262,7 +262,7 @@ export interface CascadeSelectContext { /** * Defines valid properties in CascadeSelect component. */ -export interface CascadeSelectProps { +export interface CascadeSelectProps { /** * Value of the component. */ @@ -278,27 +278,27 @@ export interface CascadeSelectProps { /** * An array of selectitems to display as the available options. */ - options?: any[] | undefined; + options?: T[] | undefined; /** * Property name or getter function to use as the label of an option. */ - optionLabel?: string | ((data: any) => string) | undefined; + optionLabel?: string | ((data: T) => string) | undefined; /** * Property name or getter function to use as the value of an option, defaults to the option itself when not defined. */ - optionValue?: string | ((data: any) => any) | undefined; + optionValue?: string | ((data: T) => any) | undefined; /** * Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. */ - optionDisabled?: string | ((data: any) => boolean) | undefined; + optionDisabled?: string | ((data: T) => boolean) | undefined; /** * Property name or getter function to use as the label of an option group. */ - optionGroupLabel?: string | ((data: any) => string) | undefined; + optionGroupLabel?: string | ((data: T) => string) | undefined; /** * Property name or getter function to retrieve the items of a group. */ - optionGroupChildren?: string[] | string | ((data: any) => any[]) | undefined; + optionGroupChildren?: string[] | string | ((data: T) => any[]) | undefined; /** * Default text to display when no option is selected. */ @@ -494,7 +494,7 @@ export interface CascadeSelectProps { /** * Defines valid slots in CascadeSelect component. */ -export interface CascadeSelectSlots { +export interface CascadeSelectSlots { /** * Custom content for each option. * @param {Object} scope - option slot's params. @@ -503,7 +503,7 @@ export interface CascadeSelectSlots { /** * Option instance */ - option: any; + option: T; /** * Selection state */ @@ -551,7 +551,7 @@ export interface CascadeSelectSlots { /** * Options of the component */ - options: any[]; + options: T[]; }): VNode[]; /** * Custom footer template. @@ -564,7 +564,7 @@ export interface CascadeSelectSlots { /** * Options of the component */ - options: any[]; + options: T[]; }): VNode[]; /** * Custom clear icon template. @@ -650,11 +650,19 @@ export declare type CascadeSelectEmits = EmitFn; * @group Component * */ -declare const CascadeSelect: DefineComponent; +declare const CascadeSelect: { + new ( + props: CascadeSelectProps + ): { + $props: CascadeSelectProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: CascadeSelectSlots; + $emit: EmitFn; + }; +}; declare module 'vue' { export interface GlobalComponents { - CascadeSelect: DefineComponent; + CascadeSelect: typeof CascadeSelect; } } diff --git a/packages/primevue/src/dataview/DataView.d.ts b/packages/primevue/src/dataview/DataView.d.ts index 323023b0a2..862eef4d76 100755 --- a/packages/primevue/src/dataview/DataView.d.ts +++ b/packages/primevue/src/dataview/DataView.d.ts @@ -11,7 +11,7 @@ import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PaginatorPassThroughOptionType } from 'primevue/paginator'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue'; export declare type DataViewPassThroughOptionType = DataViewPassThroughAttributes | ((options: DataViewPassThroughMethodOptions) => DataViewPassThroughAttributes | string) | string | null | undefined; @@ -261,7 +261,7 @@ export interface DataViewProps { /** * Defines valid slots in DataView component. */ -export interface DataViewSlots { +export interface DataViewSlots { /** * Custom header template. */ @@ -357,7 +357,7 @@ export interface DataViewSlots { /** * Value of the component */ - items: any; + items: T[]; }): VNode[]; /** * Custom list template. @@ -367,7 +367,7 @@ export interface DataViewSlots { /** * Value of the component */ - items: any; + items: T[]; }): VNode[]; } @@ -406,11 +406,19 @@ export declare type DataViewEmits = EmitFn; * @group Component * */ -declare const DataView: DefineComponent; +declare const DataView: { + new ( + props: DataViewProps + ): { + $props: DataViewProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: DataViewSlots; + $emit: EmitFn; + }; +}; declare module 'vue' { export interface GlobalComponents { - DataView: DefineComponent; + DataView: typeof DataView; } }