fix(form-core): export FormListenerFieldProps to fix TS4023 declaration emit#2219
fix(form-core): export FormListenerFieldProps to fix TS4023 declaration emit#2219mixelburg wants to merge 1 commit into
Conversation
…on 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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new exported generic interface ChangesFormListenerFieldProps export and FormListeners refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #2210
Extract the inline
{formApi, fieldApi}callback props type fromFormListenersinto a named exportedFormListenerFieldPropsinterface.Previously, exporting a
formOptions()result that includedlistenersfailed with TS4023 because TypeScript could not serialize the anonymous inline type into a.d.tsfile. By giving the type an explicit name and exporting it, declaration emit can now reference it directly.All 438 tests pass across TS 5.4–5.8.
Summary by CodeRabbit
onChange,onBlur, andonFieldUnmountcallbacks. This improves overall type safety and consistency for developers working with form event handlers.