diff --git a/packages/@core/ui-kit/form-ui/src/types.ts b/packages/@core/ui-kit/form-ui/src/types.ts index cadf794c..f9bc9d29 100644 --- a/packages/@core/ui-kit/form-ui/src/types.ts +++ b/packages/@core/ui-kit/form-ui/src/types.ts @@ -60,6 +60,8 @@ export type MaybeComponentPropKey = | keyof HtmlHTMLAttributes | (Record & string); +export type MaybeComponentEvents = { [K in MaybeComponentPropKey]?: any }; + export type MaybeComponentProps = { [K in MaybeComponentPropKey]?: any }; export type FormActions = FormContext; @@ -128,9 +130,12 @@ export interface FormItemDependencies { triggerFields: string[]; } -type ComponentEvents = { - [K: string]: (...args: any[]) => void; -} & Record; +type ComponentEvents = + | (( + value: Partial>, + actions: FormActions, + ) => MaybeComponentEvents) + | MaybeComponentEvents; type ComponentProps = | ((