fix: preserve null unions in setFieldsValue types#781
Conversation
|
@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
总体概述此PR修改了 改动一览
代码审查估计🎯 3 (中等) | ⏱️ ~20 分钟 建议审查者
兔兔之歌
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #781 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 20 20
Lines 1328 1328
Branches 329 329
=======================================
Hits 1322 1322
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the RecursivePartial utility type to simplify its structure and adds comprehensive test cases for nullable lists and nested optional objects. A suggestion was made to update the array check to support readonly types, preventing immutable arrays from being incorrectly processed as objects.
变更说明
RecursivePartial对null联合类型的错误收窄,使setFieldsValue能正确接受数组 | null类型的字段null联合场景以及之前可选嵌套字段的 partial 场景验证
npm run lint:tscfix ant-design/ant-design#57707