diff --git a/packages/primevue/src/inputchips/InputChips.d.ts b/packages/primevue/src/inputchips/InputChips.d.ts index d651e953db..a28b2c0e7f 100755 --- a/packages/primevue/src/inputchips/InputChips.d.ts +++ b/packages/primevue/src/inputchips/InputChips.d.ts @@ -11,7 +11,7 @@ import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { ChipPassThroughOptions } from 'primevue/chip'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { InputHTMLAttributes, VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, InputHTMLAttributes, VNode, VNodeProps } from 'vue'; export declare type InputChipsPassThroughOptionType = InputChipsPassThroughAttributes | ((options: InputChipsPassThroughMethodOptions) => InputChipsPassThroughAttributes | string) | string | null | undefined; @@ -155,11 +155,11 @@ export interface InputChipsState { /** * Defines valid properties in InputChips component. */ -export interface InputChipsProps { +export interface InputChipsProps { /** * Value of the component. */ - modelValue?: any[]; + modelValue?: T[]; /** * Maximum number of entries allowed. */ @@ -252,7 +252,7 @@ export interface InputChipsProps { /** * Defines valid slots in InputChips slots. */ -export interface InputChipsSlots { +export interface InputChipsSlots { /** * Custom chip template. * @param {Object} scope - chip slot's params. @@ -261,7 +261,7 @@ export interface InputChipsSlots { /** * Value of the component */ - value: any; + value: T; }): VNode[]; /** * @deprecated since v4.0. Use 'chipicon' slot. @@ -338,11 +338,19 @@ export declare type InputChipsEmits = EmitFn; * @group Component * */ -declare const InputChips: DefineComponent; +declare const InputChips: { + new ( + props: InputChipsProps & VNodeProps & AllowedComponentProps & ComponentCustomProps + ): { + $props: InputChipsProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: InputChipsSlots; + $emit: InputChipsEmits; + }; +}; declare module 'vue' { export interface GlobalComponents { - InputChips: DefineComponent; + InputChips: typeof InputChips; } } diff --git a/packages/primevue/src/selectbutton/SelectButton.d.ts b/packages/primevue/src/selectbutton/SelectButton.d.ts index b8815d99d1..b6c86e49f3 100755 --- a/packages/primevue/src/selectbutton/SelectButton.d.ts +++ b/packages/primevue/src/selectbutton/SelectButton.d.ts @@ -9,7 +9,7 @@ */ import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue'; // import { ToggleButtonPassThroughOptions } from 'primevue/togglebutton'; import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core'; @@ -120,7 +120,7 @@ export interface SelectButtonState { /** * Defines valid properties in SelectButton component. */ -export interface SelectButtonProps { +export interface SelectButtonProps { /** * Value of the component. */ @@ -136,19 +136,19 @@ export interface SelectButtonProps { /** * 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; /** * When specified, allows selecting multiple values. * @defaultValue false @@ -214,7 +214,7 @@ export interface SelectButtonProps { /** * Defines valid slots in SelectButton component. */ -export interface SelectButtonSlots { +export interface SelectButtonSlots { /** * Custom content for each option. * @param {Object} scope - option slot's params. @@ -223,7 +223,7 @@ export interface SelectButtonSlots { /** * Option instance */ - option: any; + option: T; /** * Index of the option */ @@ -275,11 +275,19 @@ export declare type SelectButtonEmits = EmitFn; * @group Component * */ -declare const SelectButton: DefineComponent; +declare const SelectButton: { + new ( + props: SelectButtonProps & VNodeProps & AllowedComponentProps & ComponentCustomProps + ): { + $props: SelectButtonProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: SelectButtonSlots; + $emit: SelectButtonEmits; + }; +}; declare module 'vue' { export interface GlobalComponents { - SelectButton: DefineComponent; + SelectButton: typeof SelectButton; } } diff --git a/packages/primevue/src/virtualscroller/VirtualScroller.d.ts b/packages/primevue/src/virtualscroller/VirtualScroller.d.ts index 13cea43f1d..baaaa1332e 100644 --- a/packages/primevue/src/virtualscroller/VirtualScroller.d.ts +++ b/packages/primevue/src/virtualscroller/VirtualScroller.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 { VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue'; export declare type VirtualScrollerPassThroughOptionType = VirtualScrollerPassThroughAttributes | ((options: VirtualScrollerPassThroughMethodOptions) => VirtualScrollerPassThroughAttributes | string) | string | null | undefined; @@ -222,7 +222,7 @@ export interface VirtualScrollerLoaderOptions extends VirtualScrollerItemOptions /** * Defines valid properties in VirtualScroller component. */ -export interface VirtualScrollerProps { +export interface VirtualScrollerProps { /** * Unique identifier of the element. */ @@ -238,7 +238,7 @@ export interface VirtualScrollerProps { /** * An array of objects to display. */ - items?: any[] | any[][] | undefined | null; + items?: T[] | T[][] | undefined | null; /** * The height/width of item according to orientation. */ @@ -356,7 +356,7 @@ export interface VirtualScrollerProps { /** * Defines valid slots in VirtualScroller component. */ -export interface VirtualScrollerSlots { +export interface VirtualScrollerSlots { /** * Custom content template. * @param {Object} scope - content slot's params. @@ -365,7 +365,7 @@ export interface VirtualScrollerSlots { /** * An array of objects to display for virtualscroller */ - items: any; + items: T[]; /** * Style class of the content */ @@ -433,7 +433,7 @@ export interface VirtualScrollerSlots { /** * Item data. */ - item: any; + item: T; /** * Item options. */ @@ -526,11 +526,19 @@ export interface VirtualScrollerMethods { * @group Component * */ -declare const VirtualScroller: DefineComponent; +declare const VirtualScroller: { + new ( + props: VirtualScrollerProps & VNodeProps & AllowedComponentProps & ComponentCustomProps + ): { + $props: VirtualScrollerProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: VirtualScrollerSlots; + $emit: VirtualScrollerEmits; + } & VirtualScrollerMethods; +}; declare module 'vue' { export interface GlobalComponents { - VirtualScroller: DefineComponent; + VirtualScroller: typeof VirtualScroller; } }