-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type: update React.forwardRef type #41189
Conversation
components/radio/radio.tsx
Outdated
@@ -84,7 +84,7 @@ const InternalRadio: React.ForwardRefRenderFunction<HTMLElement, RadioProps> = ( | |||
); | |||
}; | |||
|
|||
const Radio = React.forwardRef<unknown, RadioProps>(InternalRadio); | |||
const Radio = React.forwardRef<HTMLElement, RadioProps>(InternalRadio); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在 feature 分支中,这里的泛型类型是 CheckboxRef
,到时候进行 Branch merge 的时候可能会出现冲突,如果冲突直接采用 feature 中的类型即可。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那这里不改了吧,如果有用户依赖了显式的 HTMLElement,到时候发 minor 又会 break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里回滚了,正好发现另一个地方有问题,顺便改掉了
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #41189 +/- ##
==========================================
- Coverage 99.99% 99.99% -0.01%
==========================================
Files 610 610
Lines 10486 10450 -36
Branches 2865 2847 -18
==========================================
- Hits 10485 10449 -36
Misses 1 1
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
* type: update React.forwardRef type * type: revert
* type: update React.forwardRef type * type: revert
* type: update React.forwardRef type * type: revert
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
type: update React.forwardRef type #41188
在 feature 分支中,这里的泛型类型是
CheckboxRef
,到时候进行 Branch merge 的时候可能会出现冲突,如果冲突直接采用 feature 中的类型即可。📝 Changelog
☑️ Self-Check before Merge