@@ -285,20 +285,26 @@ export type PublicPathState<TValue = unknown> = Omit<
285285 'bails' | 'label' | 'multiple' | 'fieldsCount' | 'validate' | 'id' | 'type' | '__flags'
286286> ;
287287
288- export interface ComponentBindsConfig < TValue = unknown , TExtraProps extends GenericObject = GenericObject > {
288+ export interface ComponentBindsConfig <
289+ TValue = unknown ,
290+ TExtraProps extends GenericObject = GenericObject ,
291+ TModel extends string = 'modelValue' ,
292+ > {
289293 mapProps : ( state : PublicPathState < TValue > ) => TExtraProps ;
290294 validateOnBlur : boolean ;
291295 validateOnModelUpdate : boolean ;
292- model : string ;
296+ model : TModel ;
293297}
294298
295- export type LazyComponentBindsConfig < TValue = unknown , TExtraProps extends GenericObject = GenericObject > = (
296- state : PublicPathState < TValue > ,
297- ) => Partial < {
299+ export type LazyComponentBindsConfig <
300+ TValue = unknown ,
301+ TExtraProps extends GenericObject = GenericObject ,
302+ TModel extends string = 'modelValue' ,
303+ > = ( state : PublicPathState < TValue > ) => Partial < {
298304 props : TExtraProps ;
299305 validateOnBlur : boolean ;
300306 validateOnModelUpdate : boolean ;
301- model : string ;
307+ model : TModel ;
302308} > ;
303309
304310export interface BaseInputBinds < TValue = unknown > {
@@ -353,7 +359,7 @@ export interface FormContext<TValues extends GenericObject = GenericObject, TOut
353359 TExtras extends GenericObject = GenericObject ,
354360 > (
355361 path : MaybeRefOrGetter < TPath > ,
356- config ?: Partial < ComponentBindsConfig < TValue , TExtras > > | LazyComponentBindsConfig < TValue , TExtras > ,
362+ config ?: Partial < ComponentBindsConfig < TValue , TExtras , TModel > > | LazyComponentBindsConfig < TValue , TExtras , TModel > ,
357363 ) : Ref < BaseComponentBinds < TValue , TModel > & TExtras > ;
358364 defineInputBinds <
359365 TPath extends Path < TValues > ,
0 commit comments