Skip to content

Commit 014c718

Browse files
committed
fix(form-core): export FormListenerFieldProps to fix TS4023 declaration emit
Extract the inline {formApi, fieldApi} callback props type from FormListeners into a named exported FormListenerFieldProps interface. Previously, exporting a formOptions() result that included listeners failed with TS4023 because TypeScript could not serialize the anonymous type into a .d.ts file.
1 parent 6a73479 commit 014c718

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/form-core/src/FormApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export interface FormValidators<
229229
onDynamicAsyncDebounceMs?: number
230230
}
231231

232-
interface FormListenersPropsGroup<
232+
export interface FormListenersPropsGroup<
233233
TFormData,
234234
TOnMount extends undefined | FormValidateOrFn<TFormData>,
235235
TOnChange extends undefined | FormValidateOrFn<TFormData>,
@@ -260,7 +260,7 @@ interface FormListenersPropsGroup<
260260
groupApi: AnyFormGroupApi
261261
}
262262

263-
interface FormListenersPropsField<
263+
export interface FormListenersPropsField<
264264
TFormData,
265265
TOnMount extends undefined | FormValidateOrFn<TFormData>,
266266
TOnChange extends undefined | FormValidateOrFn<TFormData>,

0 commit comments

Comments
 (0)