Skip to content
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

[v4] Fix(types): external module type error (CompoundedComponent) #39058

Merged

Conversation

wangcch
Copy link
Contributor

@wangcch wangcch commented Nov 28, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#38666

💡 Background and solution

Wrong type for CompoundedComponent from external module
For V4.x

📝 Changelog

Language Changelog
🇺🇸 English Fix 'CompoundedComponent' type error from external module
🇨🇳 Chinese 修复外部暴露类 CompoundedComponent 的组建的类型报错

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2022

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (7923109) compared to base (c5198a4).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           4.x-stable    #39058   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files             450       450           
  Lines            8333      8333           
  Branches         2539      2539           
============================================
  Hits             8333      8333           
Impacted Files Coverage Δ
components/badge/index.tsx 100.00% <ø> (ø)
components/button/button.tsx 100.00% <ø> (ø)
components/checkbox/index.tsx 100.00% <ø> (ø)
components/input/index.tsx 100.00% <ø> (ø)
components/mentions/index.tsx 100.00% <ø> (ø)
components/radio/index.tsx 100.00% <ø> (ø)
components/space/index.tsx 100.00% <ø> (ø)
components/statistic/Countdown.tsx 100.00% <ø> (ø)
components/statistic/Statistic.tsx 100.00% <ø> (ø)
components/switch/index.tsx 100.00% <ø> (ø)
... and 19 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wangcch wangcch force-pushed the fix-v4-compounded-component-type branch from 52ee67b to 9c35b3f Compare November 28, 2022 12:59
@wangcch wangcch changed the title v4.x Fix(types): external module type error (CompoundedComponent) [v4] Fix(types): external module type error (CompoundedComponent) Dec 1, 2022
@yoyo837
Copy link
Contributor

yoyo837 commented Jan 3, 2023

Rebase please.

@wangcch wangcch force-pushed the fix-v4-compounded-component-type branch from 9c35b3f to 9bdf478 Compare January 3, 2023 02:35
@wangcch
Copy link
Contributor Author

wangcch commented Jan 3, 2023

Rebase please.

Done

@@ -69,7 +69,7 @@ interface IconNodeProps {
description: AlertProps['description'];
}

const IconNode: React.FC<IconNodeProps> = props => {
const IconNode: React.FC<IconNodeProps> = (props) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些括号的改动能避免吗? 有点多不好review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看你本地prettier 设置

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个之前的 PR 有说明,是 .prettierrc ("arrowParens": "avoid") 和 rome js config 冲突

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git hook: rome format when pre-commit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把本地git hook 干掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有一部分, 能都还原吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

剩下的都是必要修改行,随带按照 rome config 修改了
截屏2023-01-03 11 32 42

@wangcch wangcch force-pushed the fix-v4-compounded-component-type branch from 9bdf478 to 7923109 Compare January 3, 2023 03:00
@yoyo837 yoyo837 merged commit ae62ef7 into ant-design:4.x-stable Jan 3, 2023
@MadCcc MadCcc mentioned this pull request Feb 6, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants