Fixed #5405 - TypeScript emits are in an incompatible format with defineEmits

This commit is contained in:
Mert Sincan 2024-05-16 11:50:43 +01:00
parent c3669ad03a
commit 98302e417e
114 changed files with 948 additions and 637 deletions

View file

@ -10,7 +10,7 @@
import { InputHTMLAttributes } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { PassThroughOptions } from '../passthrough';
import { ClassComponent, DesignToken, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
import { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
export declare type InputTextPassThroughOptionType<T = any> = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions<T>) => InputTextPassThroughAttributes | string) | string | null | undefined;
@ -130,7 +130,7 @@ export interface InputTextSlots {}
/**
* Defines valid emits in InputText component.
*/
export interface InputTextEmits {
interface InputTextEmitsOptions {
/**
* Emitted when the value changes.
* @param {string} value - New value.
@ -138,6 +138,8 @@ export interface InputTextEmits {
'update:modelValue'(value: string | undefined): void;
}
export declare type InputTextEmits = EmitFn<InputTextEmitsOptions>;
/**
* **PrimeVue - InputText**
*
@ -148,12 +150,13 @@ export interface InputTextEmits {
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
*
* @group Component
*
*/
declare class InputText extends ClassComponent<InputTextProps, InputTextSlots, InputTextEmits> {}
declare const InputText: DefineComponent<InputTextProps, InputTextSlots, InputTextEmits>;
declare module 'vue' {
export interface GlobalComponents {
InputText: GlobalComponentConstructor<InputText>;
InputText: GlobalComponentConstructor<InputTextProps, InputTextSlots, InputTextEmits>;
}
}